Skip to content

Commit d377abe

Browse files
committed
Dummy: Dummy
1 parent 58679cb commit d377abe

File tree

1 file changed

+9
-24
lines changed

1 file changed

+9
-24
lines changed

.github/workflows/playwright.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ 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
@@ -25,34 +27,17 @@ jobs:
2527
with:
2628
hugo-version: '0.147.8'
2729
extended: true
30+
- uses: actions/setup-go@v6
31+
with:
32+
go-version: '1.24.6'
33+
- run: go version
2834
- name: Install dependencies
29-
run: cd tests && npm ci
30-
- name: Check playwright version
31-
id: check-playwright-version
32-
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 }}
35+
run: cd tests && npm ci && npx playwright install --with-deps ${{ env.BROWSERS }} --only-shell
5236
- name: Run Playwright tests
5337
id: test-ui
5438
run: |
55-
make tests | tee output.log
39+
git config --global --add safe.directory /__w/nginx-hugo-theme/nginx-hugo-theme
40+
cd tests && npx playwright test | tee output.log
5641
if grep -q "failed" output.log; then
5742
echo "Playwright tests failed. Please view the Playwright report to see full error."
5843
exit 1

0 commit comments

Comments
 (0)