-
Notifications
You must be signed in to change notification settings - Fork 616
107 lines (97 loc) · 2.8 KB
/
browsers.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
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
102
103
104
105
106
107
name: End-to-end tests (playwright)
on:
push:
branches: [ main ]
paths:
- 'src/**'
- 'test-e2e/**'
- 'package-lock.json'
- '.browserslistrc'
- 'babel.config.json'
- 'public/index.html'
- 'public/**/index.html'
- '.github/workflows/browsers.yml'
- 'playwright.config.ts'
pull_request:
paths:
- 'src/**'
- 'test-e2e/**'
- 'package-lock.json'
- '.browserslistrc'
- 'babel.config.json'
- 'public/index.html'
- 'public/**/index.html'
- '.github/workflows/browsers.yml'
- 'playwright.config.ts'
jobs:
test-e2e-playwright:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
browser: [chromium, firefox, webkit]
exclude:
- os: windows-latest
browser: webkit
- os: windows-latest
browser: firefox
- os: macos-latest
browser: firefox
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci --no-audit
env:
HUSKY_SKIP_INSTALL: true
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- run: npx playwright install-deps
- name: Run Playwright tests
run: npx playwright test --project=${{ matrix.browser }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshot-${{ matrix.os }}-${{ matrix.browser }}
path: test-results/**/*.png
- uses: actions/upload-artifact@v4
if: '!cancelled()'
with:
name: blob-report-${{ matrix.os }}-${{ matrix.browser }}
path: blob-report/
retention-days: 1
merge-reports:
# Merge reports after playwright-tests, even if some shards have failed
if: ${{ !cancelled() }}
needs: [test-e2e-playwright]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: Merge into HTML Report
run: npx playwright merge-reports -c test-e2e/merge.config.ts ./all-blob-reports
- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 30