-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (65 loc) · 2.05 KB
/
coverage.yaml
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
name: Coverage processing
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
wait_for_data:
timeout-minutes: 10
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: wyvox/action-setup-pnpm@v3
with:
node-version: "20.1.0"
- name: Wait for Playwright tests
continue-on-error: false
uses: fountainhead/action-wait-for-check@v1.2.0
id: wait-for-playwright-tests
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: Playwright tests queue
timeoutSeconds: 600
intervalSeconds: 30
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Download Playwright test coverage artifacts
uses: dawidd6/action-download-artifact@v7
with:
github_token: ${{secrets.GITHUB_TOKEN}}
path: ./artifacts
workflow: playwright.yaml
workflow_conclusion: success
name: playwright-coverage
pr: ${{github.event.pull_request.number}}
- name: Fix paths inside coverage reports
run: node ./bin/fix-paths-in-coverage-reports.cjs
- name: Merge all reported JSONs into one
run: pnpm run ci:nyc:merge
- name: Generate report
run: pnpm run ci:nyc:report
- name: Archive coverage report
uses: vimtor/action-zip@v1
with:
files: ./coverage/lcov-report/
dest: coverage.zip
- name: Upload coverage report as artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.zip
retention-days: 1
- name: Jest Lcov Reporter v2
uses: lifeart/jest-lcov-reporter@v0.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: ./coverage/lcov.info
update-comment: true
show-changed-files: false
min-coverage: 1