-
Notifications
You must be signed in to change notification settings - Fork 367
60 lines (49 loc) · 1.47 KB
/
e2e.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
name: End-to-end tests
on:
push:
branches: [main]
pull_request:
jobs:
e2e_tests:
env:
NEXT_PUBLIC_GA_ID: xxx
E2E_COVERAGE: true
name: End-to-end tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Set up steps
uses: ./.github/actions/setup-steps
- name: End-to-end tests
run: yarn test:e2e:coverage
env:
FORCE_COLOR: 2
- name: Generate coverage report
run: yarn nyc:report
- name: Run empty coverage check
run: ruby -e "require 'json'; raise 'Empty report' if JSON.parse(File.read('./test-coverage/e2e/coverage-final.json')) === {}"
- name: Upload Playwright HTML report
if: failure()
uses: actions/upload-artifact@v3
with:
name: playwright-e2e-tests-report
path: reports/index.html
retention-days: 1
- name: Upload Playwright failure screenshots
if: failure()
uses: actions/upload-artifact@v3
with:
name: e2e-tests-failure-screenshots
path: screenshots
retention-days: 1
- name: Upload test coverage HTML report
uses: actions/upload-artifact@v3
with:
name: e2e-coverage-report
path: test-coverage/e2e
retention-days: 1