Skip to content

Commit c82a1c3

Browse files
committed
Load Chromium from cache if possible
Signed-off-by: Mike Lischke <mike@lischke-online.de>
1 parent cee90ed commit c82a1c3

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,20 @@ jobs:
2424
- name: Install dependencies
2525
run: npm ci
2626

27-
- name: Setup Playwright
28-
uses: microsoft/playwright@v1
27+
- name: Cache Playwright browsers
28+
uses: actions/cache@v4
29+
id: playwright-cache
2930
with:
30-
browsers: chromium
31+
path: ~/.cache/ms-playwright
32+
key: playwright-chromium-${{ hashFiles('package-lock.json') }}
33+
34+
- name: Install Playwright browser
35+
run: npx playwright install --with-deps chromium
36+
if: steps.playwright-cache.outputs.cache-hit != 'true'
37+
38+
- name: Install Playwright system deps only
39+
run: npx playwright install-deps chromium
40+
if: steps.playwright-cache.outputs.cache-hit == 'true'
3141

3242
- name: Build app
3343
run: npm run build

0 commit comments

Comments
 (0)