Skip to content

Commit ebf2859

Browse files
committed
chore: 🤖 add visual regression tests github action
1 parent 62311c4 commit ebf2859

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 🎭 Visual regression tests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
env:
8+
HUSKY: 0
9+
10+
jobs:
11+
visual-regression:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- uses: actions/setup-node@v6
17+
with:
18+
node-version: 'latest'
19+
20+
- name: Enable Corepack
21+
run: corepack enable
22+
23+
- name: Install dependencies
24+
run: yarn install --immutable
25+
26+
- name: Install Playwright browsers
27+
run: npx playwright install --with-deps chromium
28+
29+
# NOTE: The tests path is located in playwright.config.ts
30+
# e.g. ./tests
31+
- name: Run visual regression tests
32+
run: npx playwright test
33+
34+
- name: Upload test results
35+
if: failure()
36+
uses: actions/upload-artifact@v6
37+
with:
38+
name: playwright-report
39+
path: |
40+
playwright-report/
41+
test-results/
42+
retention-days: 30

0 commit comments

Comments
 (0)