Skip to content

Commit 0194078

Browse files
committed
ci: cache playwright chrome install
1 parent e66b53e commit 0194078

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,16 @@ jobs:
100100
- name: Install dependencies
101101
run: pnpm install --frozen-lockfile
102102

103-
- name: Install Playwright browsers
104-
run: pnpm exec playwright install --with-deps
103+
- name: Cache Playwright browsers
104+
id: playwright-cache
105+
uses: actions/cache@v4
106+
with:
107+
path: ~/.cache/ms-playwright
108+
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
109+
110+
- name: Install Playwright browser
111+
if: steps.playwright-cache.outputs.cache-hit != 'true'
112+
run: pnpm exec playwright install chrome --with-deps
105113

106114
- name: E2E Tests
107115
run: pnpm test:e2e

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@ jobs:
3535
- name: Install Dependencies
3636
run: pnpm install --frozen-lockfile
3737

38-
- name: Install Playwright browsers
39-
run: pnpm exec playwright install --with-deps
38+
- name: Cache Playwright browsers
39+
id: playwright-cache
40+
uses: actions/cache@v4
41+
with:
42+
path: ~/.cache/ms-playwright
43+
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
44+
45+
- name: Install Playwright browser
46+
if: steps.playwright-cache.outputs.cache-hit != 'true'
47+
run: pnpm exec playwright install chrome --with-deps
4048

4149
- name: Release Preflight
4250
run: pnpm run release:check

0 commit comments

Comments
 (0)