Skip to content

Commit 74df4c3

Browse files
committed
re-add node_modules cache
This in combination with `cache: npm` for the `setup-node` would be awesome if that works.
1 parent 2a88642 commit 74df4c3

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
uses: actions/setup-node@v3
3434
with:
3535
node-version: ${{ matrix.node-version }}
36+
cache: 'npm'
3637

3738
- name: Use cached node_modules (tailwindcss)
3839
id: cache-tailwindcss

.github/workflows/nodejs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,17 @@ jobs:
2828
node-version: ${{ matrix.node-version }}
2929
cache: 'npm'
3030

31+
- name: Use cached node_modules
32+
id: cache
33+
uses: actions/cache@v3
34+
with:
35+
path: node_modules
36+
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
37+
restore-keys: |
38+
nodeModules-
39+
3140
- name: Install dependencies
41+
if: steps.cache.outputs.cache-hit != 'true'
3242
run: npm install
3343
env:
3444
CI: true

.github/workflows/release-insiders.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,17 @@ jobs:
2525
registry-url: 'https://registry.npmjs.org'
2626
cache: 'npm'
2727

28+
- name: Use cached node_modules
29+
id: cache
30+
uses: actions/cache@v3
31+
with:
32+
path: node_modules
33+
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
34+
restore-keys: |
35+
nodeModules-
36+
2837
- name: Install dependencies
38+
if: steps.cache.outputs.cache-hit != 'true'
2939
run: npm install
3040
env:
3141
CI: true

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,17 @@ jobs:
2525
registry-url: 'https://registry.npmjs.org'
2626
cache: 'npm'
2727

28+
- name: Use cached node_modules
29+
id: cache
30+
uses: actions/cache@v3
31+
with:
32+
path: node_modules
33+
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
34+
restore-keys: |
35+
nodeModules-
36+
2837
- name: Install dependencies
38+
if: steps.cache.outputs.cache-hit != 'true'
2939
run: npm install
3040
env:
3141
CI: true

0 commit comments

Comments
 (0)