Skip to content

Commit 8d77409

Browse files
committed
Restore the exclusion on 'node_modules' for cache keys
It's a generated directory, which means it shouldn't affect the suitability of the cache, and I've seen new(?) failures where the cache action times out when trying to save the cache.
1 parent 0c604e0 commit 8d77409

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/test-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
~/.npm
5555
${{ github.workspace }}/web_ui/frontend/.next/cache
5656
# Generate a new cache whenever packages or source files change.
57-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
57+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '!**/node_modules/**') }}
5858
# If source files changed but packages didn't, rebuild from a prior cache.
5959
restore-keys: |
6060
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-

.github/workflows/test-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
~/.npm
5050
${{ github.workspace }}/web_ui/frontend/.next/cache
5151
# Generate a new cache whenever packages or source files change.
52-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
52+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '!**/node_modules/**') }}
5353
# If source files changed but packages didn't, rebuild from a prior cache.
5454
restore-keys: |
5555
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-

0 commit comments

Comments
 (0)