Skip to content

Release 3.12.0 (#1474) #129

Release 3.12.0 (#1474)

Release 3.12.0 (#1474) #129

name: Node.js CI (Linux ARM64)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
# Use a standard Ubuntu runner instead of requesting ARM64 hardware directly
runs-on: ubuntu-latest
strategy:
matrix:
# Using the same Node versions as the main workflow
node-version: [18, 20, 22]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Run tests in ARM64 Docker container
run: |
# Generate SSL certificates first (outside container)
mkdir -p ./test/certs
openssl req -x509 -nodes -newkey rsa:2048 -keyout ./test/certs/server-key.pem -out ./test/certs/server-cert.pem -days 1 -subj "/C=CL/ST=RM/L=OpenTelemetryTest/O=Root/OU=Test/CN=ca"
# Set proper permissions for the mounted volume
chmod -R 777 .
# Run the Node.js tests in ARM64 container
docker run --rm -v ${{ github.workspace }}:/app -w /app --platform linux/arm64 node:${{ matrix.node-version }}-alpine sh -c '
# Install build tools needed for native modules
apk add --no-cache python3 make g++
# Install and run tests
npm run clean
npm i
npm run build --if-present
npm run lint
npm test
'