-
Notifications
You must be signed in to change notification settings - Fork 4
86 lines (71 loc) · 2.53 KB
/
verify.yaml
File metadata and controls
86 lines (71 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Verify PR build
on:
pull_request:
branches: [ 'main', 'master' ]
concurrency:
group: '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./spock-website
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Verify LFS files
run: |
git lfs install
git lfs fsck --pointers HEAD
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 24 # LTS
cache: 'npm'
cache-dependency-path: spock-website/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v5
with:
name: 'gh-pages-preview'
path: './spock-website/dist'
verify:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.57.0-noble
options: --user 1001
defaults:
run:
working-directory: ./spock-website
steps:
# Unlike the default image, the playwright image does not have git-lfs installed
- name: Install git-lfs
run: |
apt-get update
apt-get install -y git-lfs
- name: Checkout
uses: actions/checkout@v6
with:
lfs: true # Download LFS files for screenshots
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: 'npm'
cache-dependency-path: spock-website/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run Playwright Tests
run: npx playwright test
- name: Upload Test Results (optional)
uses: actions/upload-artifact@v5
if: always()
with:
name: playwright-report
path: spock-website/playwright-report/
- name: Check for broken links
run: npx linkinator ./dist/