-
Notifications
You must be signed in to change notification settings - Fork 329
66 lines (63 loc) · 1.73 KB
/
visual-regression.yml
File metadata and controls
66 lines (63 loc) · 1.73 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
name: Visual Regression Testing
on:
pull_request:
branches:
- main
- develop
- 'feature/**'
# Only run if CSS/JS related files changed.
paths:
- '.github/workflows/visual-regression.yml'
- 'assets/**'
- '!assets/**/__tests__/**/*.js'
- '!assets/**/test/*.js'
- '!assets/**/*.test.js'
- '**.stories.js'
- 'tests/backstop/**'
- 'storybook/**'
- '**.scss'
- '.nvmrc'
- '**/package.json'
- 'package-lock.json'
types:
- opened
- reopened
- synchronize
- ready_for_review
concurrency:
group: visual-regression-${{ github.ref }}
cancel-in-progress: true
jobs:
visual-regression:
name: Run VR Tests
runs-on: ubuntu-latest
timeout-minutes: 30
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v6
- name: Setup Node.js (.nvmrc)
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm
- name: npm install
run: npm ci -w assets -w tests/backstop -w storybook -w tests/js --include-workspace-root
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: google-site-kit-bot
password: ${{ secrets.GH_BOT_TOKEN }}
- name: Run Backstopjs
run: npm run test:visualtest
- name: Upload artifacts
uses: actions/upload-artifact@v6
if: failure()
with:
name: vrt-report
path: |
tests/backstop/ci_report
tests/backstop/html_report
tests/backstop/json_report
tests/backstop/reference
tests/backstop/tests