-
Notifications
You must be signed in to change notification settings - Fork 334
44 lines (38 loc) · 1020 Bytes
/
pr-coverage.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
name: Comment PR Coverage
on:
pull_request:
branches:
- canary
- "*.x"
- 'main'
permissions:
contents: read
pull-requests: write
jobs:
coverage_report:
name: Generate coverage report
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Node Modules
run: npm ci
- name: Run Coverage Check
run: npm run lcov
- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v3
with:
coverage-files: coverage/lcov.info
minimum-coverage: 90
artifact-name: code-coverage-report
github-token: ${{ secrets.GITHUB_TOKEN }}
update-comment: true