forked from TypeStrong/typedoc
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (35 loc) · 1.18 KB
/
visual-regression.yml
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
name: Visual Regression Testing
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16
- name: Upgrade npm
run: npm i -g npm@latest
- name: Get baseline screenshots
run: |
git fetch
git checkout origin/$GITHUB_BASE_REF
npm ci
npm run build
node dist/test/capture-screenshots.js
npm run test:visual:accept
- name: Get current screenshots
run: |
git checkout $GITHUB_SHA
npm ci
npm run build
node dist/test/capture-screenshots.js
- name: Test
run: npx reg-suit run -c .config/regconfig.json --test
- name: Upload Results
uses: actions/upload-artifact@v3
with:
name: visual-regression
path: dist/tmp/.reg