-
Notifications
You must be signed in to change notification settings - Fork 35
101 lines (85 loc) · 2.45 KB
/
Copy pathplaywright.yml
File metadata and controls
101 lines (85 loc) · 2.45 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4]
shardTotal: [4]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '22.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build site
run: npm run build
- name: Seed KV Stores
run: npm run test:seed
- name: Install Playwright
run: npx playwright install chromium firefox --with-deps
- name: Run Playwright tests
run: npm run test -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=blob
- uses: actions/upload-artifact@v4
if: always()
with:
name: screenshots-${{ matrix.shardIndex }}
path: tests/images/*.png
retention-days: 10
- uses: actions/upload-artifact@v4
if: always()
with:
name: blob-report-${{ matrix.shardIndex }}
path: blob-report/
retention-days: 5
merge-reports:
if: always()
needs: [test]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '22.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
# --- SCREENSHOT MERGING ---
- name: Download all screenshots
uses: actions/download-artifact@v4
with:
pattern: screenshots-*
path: combined-screenshots
merge-multiple: true
- name: Upload unified screenshots artifact
uses: actions/upload-artifact@v4
with:
name: all-screenshots
path: combined-screenshots
retention-days: 10
# --- HTML REPORT MERGING ---
- name: Download all blob reports
uses: actions/download-artifact@v4
with:
pattern: blob-report-*
path: all-blob-reports
merge-multiple: true
# Playwright compiles the blobs into a unified HTML report
- name: Merge into HTML Report
run: npx playwright merge-reports --reporter=html ./all-blob-reports
- name: Upload unified HTML report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 10