-
Notifications
You must be signed in to change notification settings - Fork 109
36 lines (33 loc) · 1.11 KB
/
UPDATE_VISUAL_SNAPSHOTS.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: Update Visual Regression Snapshots
on:
pull_request:
types: [labeled, synchronize]
jobs:
update-snapshots:
if: github.event.pull_request.state != 'closed' && (github.event.label.name == 'update-snapshots' || contains( github.event.pull_request.labels.*.name, 'update-snapshots'))
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.43.1
options: --user 1001:1000
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup NPM cache
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install node dependencies
run: npm ci
- name: Build frontend
run: npm run build
- name: Build mock website
run: npm run build:e2e
- name: Start server
run: npm run start:visual-preview
- name: Run Playwright tests
run: npm run test:visual -- --update-snapshots
- name: Commit screenshots
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: updated snapshots'