File tree Expand file tree Collapse file tree 1 file changed +30
-6
lines changed Expand file tree Collapse file tree 1 file changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,37 @@ jobs:
1616 - uses : actions/setup-node@v4
1717 with :
1818 node-version : 24
19- - run : npm ci
20- - name : Install Playwright Browsers
21- run : npx playwright install chromium
22- - name : Install Playwright System Dependencies
23- run : npx playwright install-deps chromium
24- - run : npm test
2519
20+ - name : Install dependencies
21+ run : npm ci
22+
23+ - name : Get Playwright version
24+ id : playwright-version
25+ run : echo "version=$(npm list @playwright/test --json | jq -r '.dependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT
26+
27+ - name : Cache Playwright browsers
28+ uses : actions/cache@v4
29+ id : playwright-cache
30+ with :
31+ path : ~/.cache/ms-playwright
32+ key : ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}
33+ restore-keys : |
34+ ${{ runner.os }}-playwright-
35+
36+ - name : Install Playwright browsers
37+ if : steps.playwright-cache.outputs.cache-hit != 'true'
38+ run : npx playwright install --with-deps
39+
40+ - name : Install Playwright system dependencies
41+ if : steps.playwright-cache.outputs.cache-hit == 'true'
42+ run : npx playwright install-deps
43+
44+ - name : Run tests
45+ run : npm test
46+
47+ - name : Build
48+ run : npm run build
49+
2650 publish-npm :
2751 needs : build
2852 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments