Repository navigation
61 lines (57 loc) · 1.9 KB
/
Copy pathvisual.yml
File metadata and controls
61 lines (57 loc) · 1.9 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
name: Visual regression
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
visual:
runs-on: ubuntu-latest
# Pinned to match the committed screenshot baselines (Chromium build 1194).
# Bump this tag and the @playwright/test version together, then refresh
# baselines with `npm run test:visual:update` inside the same image.
container:
image: mcr.microsoft.com/playwright:v1.56.0-noble
steps:
- uses: actions/checkout@v7
- name: Ensure python (for docs build)
run: python3 --version || (apt-get update && apt-get install -y python3)
- run: npm ci
# Rebuild CSS/JS and docs so tested pages reflect current src/
- run: npm run build && npm run build:docs
- name: Run visual tests
run: npm run test:visual
- name: Upload diff report on failure
if: failure()
uses: actions/upload-artifact@v7.0.2
with:
name: playwright-report
path: |
playwright-report/
test-results/
retention-days: 14
behavior:
runs-on: ubuntu-latest
# Same container as the visual job: it already ships Chromium, so no
# `playwright install` download is needed. Behaviour tests load no CSS and
# take no screenshots, so the image tag does not have to match any baseline.
container:
image: mcr.microsoft.com/playwright:v1.56.0-noble
steps:
- uses: actions/checkout@v7
- run: npm ci
# dist/lombok.js is what the tests load, so build it from current src/
- run: npm run build
- name: Run behaviour tests
run: npm run test:behavior
- name: Upload report on failure
if: failure()
uses: actions/upload-artifact@v7.0.2
with:
name: behavior-report
path: |
playwright-report/
test-results/
retention-days: 14