@@ -16,39 +16,21 @@ jobs:
1616 playwright :
1717 name : Run Playwright
1818 runs-on : ubuntu-latest
19+ container :
20+ image : mcr.microsoft.com/playwright:v1.55.1-jammy
1921 steps :
2022 # Checkout the repository so the workflow has access to the code
2123 - name : Checkout code
2224 uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2325 - name : Setup Hugo
24- uses : peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
25- with :
26- hugo-version : ' 0.147.8'
27- extended : true
28- - name : Install dependencies
29- run : cd tests && npm ci
30- - name : Check playwright version
31- id : check-playwright-version
3226 run : |
33- cd tests
34- version=$(npm list @playwright/test --json | jq -r '.dependencies["@playwright/test"].version')
35- echo "version=$version" >> $GITHUB_OUTPUT
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 with dependencies
47- if : steps.restore-cache.outputs.cache-hit != 'true'
48- run : cd tests && npx playwright install --with-deps ${{ env.BROWSERS }} --only-shell
49- - name : Install playwright dependencies
50- if : steps.restore-cache.outputs.cache-hit == 'true'
51- run : cd tests && npx playwright install-deps ${{ env.BROWSERS }}
27+ HUGO_VERSION=0.147.8
28+ ARCH=$(dpkg --print-architecture)
29+ wget -O /tmp/hugo.deb "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${ARCH}.deb"
30+ apt-get update && apt-get install -y /tmp/hugo.deb
31+ hugo version
32+ - name : Install dependencies
33+ run : cd tests && npm ci && npx playwright install --with-deps ${{ env.BROWSERS }} --only-shell
5234 - name : Run Playwright tests
5335 id : test-ui
5436 run : |
0 commit comments