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