Skip to content

Commit 3b14910

Browse files
committed
Add cacheing to playwright browsers
Use Node 22
1 parent 3c5f64b commit 3b14910

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/ci-testing.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ jobs:
1212
- name: Use Node.js
1313
uses: actions/setup-node@v4
1414
with:
15-
node-version: latest
16-
- name: Install XVFB
17-
run: sudo apt-get install -y xvfb
18-
- name: Install Dependencies
19-
run: npm install
20-
- name: Install Playwright
21-
run: npx playwright install
15+
node-version: 22
16+
cache: npm
17+
- run: npm ci --ignore-scripts
18+
- name: Cache Playwright browsers
19+
id: playwright-cache
20+
uses: actions/cache@v4
21+
with:
22+
path: ~/.cache/ms-playwright
23+
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
24+
- run: npx playwright install --with-deps
25+
if: steps.playwright-cache.outputs.cache-hit != 'true'
26+
- run: npx playwright install-deps
27+
if: steps.playwright-cache.outputs.cache-hit == 'true'
2228
- name: Run Tests with XVFB
2329
run: xvfb-run --auto-servernum -- npm test
2430
env:

0 commit comments

Comments
 (0)