Skip to content

Commit 92434bc

Browse files
committed
test: upload coverage to codecov
1 parent a0fb8a7 commit 92434bc

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ jobs:
2727
run: npm run lint
2828
- name: Run tests
2929
run: npm run test
30+
- name: Upload coverage reports to Codecov
31+
if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.node-version == 20) }}
32+
uses: codecov/codecov-action@v3
33+
with:
34+
token: ${{ secrets.CODECOV_TOKEN }}
35+
files: coverage/coverage-final.json
36+
fail_ci_if_error: true

codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
comment: false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"lint:prettier": "prettier ./**/*.{json,md,yml} --check",
1313
"lint": "npm run lint:eslint && npm run lint:prettier",
1414
"lint:fix": "npm run lint:eslint -- --fix && npm run lint:prettier -- --write",
15-
"test": "jest",
15+
"test": "jest --coverage",
1616
"release": "semantic-release"
1717
},
1818
"engines": {

0 commit comments

Comments
 (0)