Skip to content

Commit 939faad

Browse files
authored
chore: add coveralls support (#77)
1 parent 09faec9 commit 939faad

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

.github/workflows/code_health.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@ jobs:
4444
run: npm ci
4545
- name: Run tests
4646
run: npm test
47+
- name: Coveralls GitHub Action
48+
uses: coverallsapp/github-action@v2.3.6
49+
if: matrix.os == 'ubuntu-latest'
50+
with:
51+
file: coverage/lcov.info
52+
git-branch: ${{ github.head_ref || github.ref_name }}
53+
git-commit: ${{ github.event.pull_request.head.sha || github.sha }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ node_modules
1010
state.json
1111

1212
tests/tmp
13+
coverage

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ export default {
1717
},
1818
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
1919
setupFilesAfterEnv: ["jest-extended/all"],
20+
coveragePathIgnorePatterns: ["node_modules", "tests", "dist"],
2021
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"check:format": "prettier -c .",
2929
"reformat": "prettier --write .",
3030
"generate": "./scripts/generate.sh",
31-
"test": "jest"
31+
"test": "jest --coverage"
3232
},
3333
"license": "Apache-2.0",
3434
"devDependencies": {

0 commit comments

Comments
 (0)