File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 2424 with :
2525 hugo-version : ' 0.147.8'
2626 extended : true
27- - name : Install dependencies and playwright browsers
28- run : cd tests && npm ci && npx playwright install --with-deps
27+ - name : Install dependencies
28+ run : cd tests && npm ci
29+ - name : Check playwright version
30+ id : check-playwright-version
31+ run : |
32+ cd tests
33+ version=$(npm list @playwright/test --json | jq -r '.dependencies["@playwright/test"].version')
34+ echo "version=$version" >> $GITHUB_OUTPUT
35+ echo "Version:" $version
36+ - name : Attempt to restore cache
37+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
38+ id : restore-cache
39+ with :
40+ # By default this path is hardcoded by OS - https://playwright.dev/python/docs/browsers#managing-browser-binaries
41+ path : ' ~/.cache/ms-playwright'
42+ key : ' ${{ runner.os }}-playwright-${{ steps.check-playwright-version.outputs.version }}'
43+ # Fallback, if version changed, use the most recent cached version.
44+ restore-keys : |
45+ ${{ runner.os }}-playwright-
46+ - name : Install playwright dependencies
47+ if : steps.restore-cache.outputs.cache-hit != 'true'
48+ run : cd tests && npx playwright install --with-deps
2949 - name : Run Playwright tests
3050 id : test-ui
3151 run : |
You can’t perform that action at this time.
0 commit comments