Skip to content

Commit 32f55ce

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 ea97866 commit 32f55ce

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
@@ -53,7 +53,7 @@ jobs:
5353
path: |
5454
${{ github.workspace }}/web_ui/frontend/.next/cache
5555
# Generate a new cache whenever packages or source files change.
56-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
56+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '!**/node_modules/**') }}
5757
# If source files changed but packages didn't, rebuild from a prior cache.
5858
restore-keys: |
5959
${{ 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
@@ -48,7 +48,7 @@ jobs:
4848
path: |
4949
${{ github.workspace }}/web_ui/frontend/.next/cache
5050
# Generate a new cache whenever packages or source files change.
51-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
51+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '!**/node_modules/**') }}
5252
# If source files changed but packages didn't, rebuild from a prior cache.
5353
restore-keys: |
5454
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-

0 commit comments

Comments
 (0)