Skip to content

Commit 328f5c1

Browse files
authored
fix: Update playwright.yml (#557)
* fix: Update playwright.yml Changes Playwright browser caching to use the root lockfile (package-lock.json), which should keep browsers cached and avoid lengthy browser reinstall (the cache refreshes when the lockfile changes, root lockfile changes less frequently but project lockfiles change every time). * Update playwright.yml Makes the cache key changes in the scheduled test as well.
1 parent 5155c49 commit 328f5c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/playwright.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ jobs:
7575
uses: actions/cache@v4
7676
with:
7777
path: ~/.cache/ms-playwright # Default Playwright cache path
78-
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('playwright.config.ts') }}
78+
key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}-${{ hashFiles('playwright.config.ts') }}
7979
restore-keys: |
80-
${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}- # Fallback for lock file changes
80+
${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}- # Fallback for lock file changes
8181
${{ runner.os }}-playwright- # Broader fallback
8282
8383
- name: Install dependencies
@@ -148,9 +148,9 @@ jobs:
148148
uses: actions/cache@v4
149149
with:
150150
path: ~/.cache/ms-playwright # Default Playwright cache path
151-
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('playwright.config.ts') }}
151+
key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}-${{ hashFiles('playwright.config.ts') }}
152152
restore-keys: |
153-
${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}- # Fallback for lock file changes
153+
${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}- # Fallback for lock file changes
154154
${{ runner.os }}-playwright- # Broader fallback
155155
156156
- name: Install dependencies

0 commit comments

Comments
 (0)