Skip to content

Commit 700c8ed

Browse files
authored
Merge pull request #22 from 3imed-jaberi/fix-codecov
Fix codecov [coverage] 🏸
2 parents 7cc117d + 1c00272 commit 700c8ed

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ language: node_js
22
node_js:
33
- 10
44
- 12
5-
after_success:
5+
script:
6+
- npm run test-ci
7+
after_script:
68
- npm run coverage

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"redis": "^3.0.2",
7777
"remark-cli": "^8.0.0",
7878
"remark-preset-github": "^1.0.1",
79+
"rimraf": "^3.0.2",
7980
"supertest": "^4.0.2",
8081
"xo": "^0.32.1"
8182
},
@@ -140,15 +141,17 @@
140141
},
141142
"repository": "ladjs/koa-better-error-handler",
142143
"scripts": {
143-
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
144+
"precommit": "lint-staged && npm tes-ci",
144145
"lint": "npm run lint:js",
145146
"lint:js": "xo",
146147
"lint:md": "remark . -qfo",
147-
"precommit": "lint-staged && npm tes-ci",
148-
"pretest-ci": "npm run lint",
149148
"test": "ava",
149+
"pretest-cov": "rimraf .nyc_output",
150+
"test-cov": "cross-env NODE_ENV=test nyc npm run test",
151+
"pretest-ci": "npm run lint",
150152
"test-ci": "npm run test-cov",
151-
"test-cov": "cross-env NODE_ENV=test nyc npm run test"
153+
"coverage": "nyc report --reporter=text-lcov > coverage.lcov",
154+
"postcoverage": "codecov"
152155
},
153156
"xo": {
154157
"prettier": true,

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6610,7 +6610,7 @@ [email protected]:
66106610
dependencies:
66116611
glob "^7.1.3"
66126612

6613-
rimraf@^3.0.0:
6613+
rimraf@^3.0.0, rimraf@^3.0.2:
66146614
version "3.0.2"
66156615
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
66166616
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==

0 commit comments

Comments
 (0)