Skip to content

Commit 1fe28ce

Browse files
committed
Split verify into visual-regersion-tests and link-check
1 parent 6ba5408 commit 1fe28ce

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

.github/workflows/verify.yaml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,32 @@ jobs:
4242
name: 'gh-pages-preview'
4343
path: './spock-website/dist'
4444

45-
verify:
45+
link-check:
46+
runs-on: ubuntu-latest
47+
defaults:
48+
run:
49+
working-directory: ./spock-website
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v6
53+
54+
- name: Set up Node
55+
uses: actions/setup-node@v6
56+
with:
57+
node-version: 24 # LTS
58+
cache: 'npm'
59+
cache-dependency-path: spock-website/package-lock.json
60+
61+
- name: Install dependencies
62+
run: npm ci
63+
64+
- name: Build
65+
run: npm run build
66+
67+
- name: Check for broken links
68+
run: npx linkinator ./dist/
69+
70+
visual-regression-tests:
4671
runs-on: ubuntu-latest
4772
container:
4873
image: mcr.microsoft.com/playwright:v1.57.0-noble
@@ -56,13 +81,7 @@ jobs:
5681
run: |
5782
apt-get update
5883
apt-get install -y git-lfs
59-
echo "Fixing permissions for non-root user and switching user"
60-
chown -R 1001:1001 .
61-
pwd
62-
ls -al
6384
su - $(id -un 1001)
64-
pwd
65-
ls -al
6685
working-directory: ./ # the default only exists after checkout
6786

6887
- name: Checkout
@@ -83,14 +102,13 @@ jobs:
83102
- name: Run Playwright Tests
84103
run: npx playwright test
85104
env:
86-
HOME: /root # Firefox is unable to launch if the $HOME folder isn't owned by the current user. This is a workaround for running in a container.
105+
# Firefox is unable to launch if the $HOME folder isn't owned by the current user.
106+
# This is a workaround for running in a container.
107+
HOME: /root
87108

88109
- name: Upload Test Results (optional)
89110
uses: actions/upload-artifact@v5
90111
if: always()
91112
with:
92113
name: playwright-report
93114
path: spock-website/playwright-report/
94-
95-
- name: Check for broken links
96-
run: npx linkinator ./dist/

0 commit comments

Comments
 (0)