Skip to content

Commit fd56842

Browse files
author
Your Name
committed
Enable coverage and codeclimate
1 parent e3dc0ad commit fd56842

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: yarn --frozen-lockfile --prefer-offline
3636

3737
- name: Test
38-
run: yarn test
38+
run: yarn test
3939

4040
- name: Upload dist
4141
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
@@ -45,6 +45,14 @@ jobs:
4545
./dist
4646
retention-days: 1
4747

48+
- name: Publish coverage report to Code Climate
49+
uses: paambaati/codeclimate-action@f429536ee076d758a24705203199548125a28ca7 # v9.0.0
50+
env:
51+
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
52+
with:
53+
debug: true
54+
coverageLocations: coverage/lcov.info:lcov
55+
4856
package:
4957
name: Package
5058
runs-on: [ubuntu-latest]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ dist
55
test-workspace/*
66
!test-workspace/.vscode
77
tools
8+
coverage

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ scripts
1515
tools/**/version.txt
1616
tools/**/target.txt
1717
tools/**/sha256.txt
18+
coverage

jest.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,16 @@ module.exports = {
44
transform: {
55
"^.+.tsx?$": ["ts-jest",{}],
66
},
7+
collectCoverage: true,
8+
collectCoverageFrom: [
9+
"src/**/*.{ts,tsx}",
10+
"!**/*.d.ts",
11+
"!**/*.factories.{ts,tsx}",
12+
"!src/desktop/extension.ts",
13+
],
14+
coverageDirectory: "./coverage",
15+
coverageReporters: [
16+
"lcov",
17+
"text"
18+
]
719
};

0 commit comments

Comments
 (0)