-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.59 KB
/
vrt.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
37
38
39
40
41
42
43
44
45
46
47
48
name: Visual Regression Testing
on:
pull_request:
types: [opened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.45.1-jammy
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install Japanese fonts
run: |
apt-get update
apt-get purge -y fonts-wqy-zenhei fonts-ipafont-gothic
apt-get install -y fonts-noto-cjk-extra
fc-cache -fv
- uses: ./.github/actions/setup
- name: Run visual tests
continue-on-error: true
id: vrt
run: npm run test:vrt
- uses: ./.github/actions/netlify
id: netlify
timeout-minutes: 1
with:
publish-dir: ./.reg
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
- if: ${{ steps.vrt.outcome == 'success' }}
name: Comment PR if success
uses: thollander/actions-comment-pull-request@v2
with:
message: |
**✨✨ That's perfect, there is no visual difference! ✨✨**
You can check [this report](${{ steps.netlify.outputs.netlify-url }}) out here.
comment_tag: test-report-vrt
- if: ${{ steps.vrt.outcome == 'failure' }}
name: Comment PR if failure
uses: thollander/actions-comment-pull-request@v2
with:
message: |
**reg-suit detected visual differences.**
Check [this report](${{ steps.netlify.outputs.netlify-url }}), and review them.
comment_tag: test-report-vrt