Skip to content

Commit a1b3a83

Browse files
authored
Merge pull request #560 from FalkorDB/copilot/cache-playwright-browsers-ci
Cache Playwright browser binaries in CI
2 parents b62b0ab + a26fc0e commit a1b3a83

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,26 @@ jobs:
4949
- name: Seed test data into FalkorDB
5050
run: python e2e/seed_test_data.py
5151

52-
- name: Install Playwright
52+
- name: Install Playwright npm dependencies
5353
run: |
5454
npm ci
55-
npx playwright install --with-deps
55+
56+
- name: Cache Playwright browsers
57+
id: playwright-cache
58+
uses: actions/cache@v4
59+
with:
60+
path: ~/.cache/ms-playwright
61+
key: playwright-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package-lock.json') }}
62+
63+
- name: Install Playwright browsers
64+
if: steps.playwright-cache.outputs.cache-hit != 'true'
65+
run: npx playwright install --with-deps chromium firefox
66+
67+
- name: Install Playwright system deps
68+
if: steps.playwright-cache.outputs.cache-hit == 'true'
69+
run: |
70+
npx playwright install chromium firefox
71+
npx playwright install-deps chromium firefox
5672
5773
- name: Run Playwright tests
5874
env:

0 commit comments

Comments
 (0)