Skip to content

Commit 067cb87

Browse files
authored
ci: Fix codecov upload (#99)
1 parent 91390d3 commit 067cb87

File tree

5 files changed

+71
-129
lines changed

5 files changed

+71
-129
lines changed

.github/workflows/ci.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,13 @@ jobs:
8080
- run: npm test
8181
env:
8282
CI: true
83-
- run: bash <(curl -s https://codecov.io/bash)
83+
- name: Upload code coverage
84+
uses: codecov/codecov-action@v4
85+
with:
86+
fail_ci_if_error: false
87+
token: ${{ secrets.CODECOV_TOKEN }}
88+
env:
89+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
90+
concurrency:
91+
group: ${{ github.workflow }}-${{ github.ref }}
92+
cancel-in-progress: true

.nycrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"reporter": [
3+
"lcov",
4+
"text-summary"
5+
],
6+
"exclude": [
7+
"**/spec/**"
8+
]
9+
}
10+

package-lock.json

+41-125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@
4141
"@semantic-release/git": "10.0.1",
4242
"@semantic-release/npm": "10.0.3",
4343
"@semantic-release/release-notes-generator": "11.0.1",
44+
"@types/jasmine": "5.1.4",
45+
"@types/node": "22.7.6",
4446
"babel-eslint": "10.1.0",
45-
"codecov": "3.8.3",
4647
"eslint": "7.32.0",
4748
"eslint-plugin-flowtype": "5.9.0",
4849
"form-data": "4.0.0",
4950
"jasmine": "3.9.0",
51+
"jasmine-spec-reporter": "7.0.0",
5052
"madge": "5.0.1",
5153
"mailgun.js": "3.5.9",
5254
"nyc": "15.1.0",
@@ -63,8 +65,7 @@
6365
"lint:fix": "eslint '{src,spec,demo}/**/*.js' --fix",
6466
"madge": "node_modules/.bin/madge ./src $npm_config_arg",
6567
"madge:circular": "npm run madge --arg=--circular",
66-
"test": "nyc --reporter=lcov jasmine",
67-
"posttest": "nyc report --reporter=json && codecov -f coverage/*.json",
68+
"test": "nyc jasmine",
6869
"prepare": "npm run build && npm test",
6970
"demo": "node ./demo"
7071
}

spec/helper.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
2+
3+
// Set up jasmine
4+
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
5+
jasmine.getEnv().addReporter(new SpecReporter());
6+
17
// Simulate Parse User class
28
const Parse = {
39
User: class User {

0 commit comments

Comments
 (0)