Skip to content

Commit 5dabc5a

Browse files
committed
[puter] ci: playwright cache
1 parent 1a43c07 commit 5dabc5a

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ jobs:
142142
name: Run Scramjet Tests
143143
runs-on: ubuntu-latest
144144
needs: build
145+
env:
146+
PLAYWRIGHT_BROWSERS_PATH: .playwright-browsers
145147
steps:
146148
- name: Checkout code
147149
uses: actions/checkout@v4
@@ -168,8 +170,18 @@ jobs:
168170
name: scramjet
169171
path: dist
170172

171-
- name: Install Playwright Browsers
172-
run: npx playwright install --with-deps
173+
- name: Cache Playwright browsers
174+
id: pw-browsers-cache
175+
uses: actions/cache@v4
176+
with:
177+
path: .playwright-browsers
178+
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
179+
restore-keys: |
180+
playwright-${{ runner.os }}-
181+
182+
- name: Install Playwright Chromium
183+
if: steps.pw-browsers-cache.outputs.cache-hit != 'true'
184+
run: npx playwright install --with-deps chromium
173185

174186
- name: Run Playwright tests
175187
run: pnpm test

0 commit comments

Comments
 (0)