-
Notifications
You must be signed in to change notification settings - Fork 13
61 lines (61 loc) · 1.87 KB
/
e2e-tests.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
name: e2e-tests
on:
workflow_call:
jobs:
e2e-tests:
runs-on: ubuntu-latest
name: Test (${{ matrix.shard }}/${{ strategy.job-total}})
strategy:
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run e2e:coverage -- --preview --shard=${{ matrix.shard }}/${{ strategy.job-total}}
- id: check_lcov
run: |
if test -f "e2e/coverage/lcov.info"; then
mkdir -p coverage/e2e-${{ matrix.shard }}
mv e2e/coverage/lcov.info coverage/e2e-${{ matrix.shard }}/lcov.info
fi
- uses: actions/upload-artifact@v4
with:
name: e2e-test-${{ matrix.shard }}
path: |
coverage/
blob-report/
retention-days: 1
merge-reports:
needs: [e2e-tests]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: e2e-test-*
merge-multiple: true
- uses: codecov/codecov-action@v4
with:
directory: coverage
flags: e2e
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- run: npx playwright merge-reports --reporter html ./blob-report
- uses: actions/upload-artifact@v4
with:
name: e2e-playwright-report
path: playwright-report
retention-days: 7