Skip to content

Commit 7f11f8d

Browse files
committed
Add coverage report
1 parent 68bc138 commit 7f11f8d

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,10 @@ jobs:
4545

4646
- name: Test
4747
run: npm run test
48+
49+
- name: Upload code coverage
50+
if: github.event_name == 'pull_request' && needs.check-access.outputs.has-token-access == 'true'
51+
uses: ./.github/actions/coverage-report
52+
with:
53+
lcov-file: coverage/lcov.info
54+
title: Node.js Code Coverage Report

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = {
4242
// "lcov",
4343
// "clover"
4444
// ],
45-
coverageReporters: ['html', 'text', 'clover'],
45+
coverageReporters: ['lcov', 'html', 'text'],
4646

4747
// An object that configures minimum threshold enforcement for coverage results
4848
// coverageThreshold: undefined,

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"husky": "8.0.3",
7474
"jest": "29.5.0",
7575
"jest-dynalite": "3.6.1",
76+
"lcov-parse": "1.0.0",
7677
"lint-staged": "13.2.2",
7778
"prettier": "2.8.8",
7879
"start-server-and-test": "^2.0.10",

0 commit comments

Comments
 (0)