-
Notifications
You must be signed in to change notification settings - Fork 110
62 lines (59 loc) · 1.71 KB
/
visual-regression.yml
File metadata and controls
62 lines (59 loc) · 1.71 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
name: "Chromatic"
on: [pull_request]
jobs:
cypress:
name: Run Cypress for visual regression testing
runs-on: ubuntu-latest
container:
image: cypress/browsers:latest
options: --user 1001
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build InstUI
run: npm ci && npm run bootstrap
- name: Install dependencies
run: npm ci
working-directory: regression-test
- name: Run Cypress tests
uses: cypress-io/github-action@v6
env:
ELECTRON_EXTRA_LAUNCH_ARGS: "--remote-debugging-port=9222"
with:
start: npm run dev
working-directory: regression-test
- name: Upload cypress artifact for chromatic
- uses: actions/upload-artifact@v4
with:
name: test-results
path: regression-test/cypress/downloads
retention-days: 30
chromatic:
name: Run Chromatic
needs: cypress
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22.12.0
- name: Install dependencies
run: npm ci
working-directory: regression-test
- name: Download Cypress test results
uses: actions/download-artifact@v4
with:
name: test-results
path: regression-test/cypress/downloads
- name: Run Chromatic
uses: chromaui/action@latest
with:
cypress: true
projectToken: ${{ secrets.CHROMATIC_APP_CODE }}
workingDir: regression-test
env:
CHROMATIC_ARCHIVE_LOCATION: ./cypress/downloads