From 74df4c398075911d55a003e887c0ce996cf3da08 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Sat, 15 Oct 2022 23:37:09 +0200 Subject: [PATCH] re-add node_modules cache This in combination with `cache: npm` for the `setup-node` would be awesome if that works. --- .github/workflows/integration-tests.yml | 1 + .github/workflows/nodejs.yml | 10 ++++++++++ .github/workflows/release-insiders.yml | 10 ++++++++++ .github/workflows/release.yml | 10 ++++++++++ 4 files changed, 31 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 2db84c50f..23bb1efb8 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -33,6 +33,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + cache: 'npm' - name: Use cached node_modules (tailwindcss) id: cache-tailwindcss diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 4d06c5f49..3468967a3 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -28,7 +28,17 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' + - name: Use cached node_modules + id: cache + uses: actions/cache@v3 + with: + path: node_modules + key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }} + restore-keys: | + nodeModules- + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' run: npm install env: CI: true diff --git a/.github/workflows/release-insiders.yml b/.github/workflows/release-insiders.yml index 63396a95f..501cd0d47 100644 --- a/.github/workflows/release-insiders.yml +++ b/.github/workflows/release-insiders.yml @@ -25,7 +25,17 @@ jobs: registry-url: 'https://registry.npmjs.org' cache: 'npm' + - name: Use cached node_modules + id: cache + uses: actions/cache@v3 + with: + path: node_modules + key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }} + restore-keys: | + nodeModules- + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' run: npm install env: CI: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 102c3c553..25d534690 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,17 @@ jobs: registry-url: 'https://registry.npmjs.org' cache: 'npm' + - name: Use cached node_modules + id: cache + uses: actions/cache@v3 + with: + path: node_modules + key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }} + restore-keys: | + nodeModules- + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' run: npm install env: CI: true