Skip to content

Commit 3a57f60

Browse files
authored
ci: share playwright cache across branches (#5895)
### 💭 Notes Currently playwright is cached per-branch. Let's share the cache globally, that will save a minute per PR. Note: wait few weeks after #5881 so that all branches align to ubuntu 24.04. Github's `runner.os` gives "Linux" without a version, so sadly can't nicely cache per-OS.
1 parent 46503c5 commit 3a57f60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/npm-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
cache-name: cache-node-modules
5050
with:
5151
path: node_modules
52-
key: ${{ runner.os }}-build-${{ env.cache-name }}-node-v${{ steps.resolved-node-version.outputs.NODE_VERSION }}-${{ hashFiles('**/package-lock.json', 'patches/**/*.patch') }}
52+
key: ${{ runner.os }}-build-${{ env.cache-name }}-node-${{ steps.resolved-node-version.outputs.NODE_VERSION }}-${{ hashFiles('**/package-lock.json', 'patches/**/*.patch') }}
5353

5454
# Cache hit: If the cache key matches,
5555
# /node_modules/ will have been copied from a previous run.
@@ -87,7 +87,7 @@ jobs:
8787
id: playwright-cache
8888
with:
8989
path: ~/.cache/ms-playwright
90-
key: 'playwright-browsers-${{ github.head_ref }}-${{ needs.read-playwright-version.outputs.playwright-version }}'
90+
key: 'playwright-browsers-${{ needs.read-playwright-version.outputs.playwright-version }}'
9191

9292
- run: npx playwright install --with-deps
9393
if: steps.playwright-cache.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)