Skip to content

Commit

Permalink
cache modules?
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners-nr committed Feb 27, 2024
1 parent 9305df0 commit 6996c8b
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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') }}

0 comments on commit 6996c8b

Please sign in to comment.