diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index b500a9c..2b3481c 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -113,20 +113,25 @@ jobs: # flags: integration-tests-${{ matrix.node }}-${{ matrix.os }}-${{ matrix.arch }} test_linux_arm: + # Skip this group if the PR doesn't originate from the main repo. + # Trying to run this on standard runners is just going to fail due to + # lack of CPU resources. + if: ${{ vars.NR_RUNNER != '' }} strategy: max-parallel: 1 matrix: node: [ 16, 18, 20 ] -# runs-on: ${{ vars.NR_RUNNER || 'ubuntu-latest' }} runs-on: ${{ vars.NR_RUNNER }} -# concurrency: -# group: linux_arm-${{ github.workflow }}-${{ github.ref }} name: Linux / Node ${{ matrix.node }} arm64 timeout-minutes: 15 steps: - - run: cat /proc/cpuinfo - name: Checkout uses: actions/checkout@v4 + - name: Restore modules cache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/node_modules + key: linux-arm-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: @@ -148,8 +153,16 @@ jobs: uses: addnab/docker-run-action@v3 with: image: linux_arm:node-${{ matrix.node }} - options: --platform linux/arm64 + options: --platform linux/arm64 -v ${{ github.workspace }}:/host run: | + cp -R /host/node_modules . 2>/dev/null + rm -rf /host/node_modules 2>/dev/null npm install --verbose + cp -R node_modules /host/ npm run unit npm run integration + - name: Update modules cache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/node_modules + key: linux-arm-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}