Skip to content

Commit 2ab59a3

Browse files
committed
Hello codecov
1 parent 984cb97 commit 2ab59a3

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ npm-debug.log
1919
prebuilds
2020
zmq-build.log
2121
windows/lib/libzmq.lib
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage
25+
.nyc_output
26+
coverage.lcov

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ install:
3838
- '[ -z "$REBUILD" ] || npm install -g node-gyp'
3939
- '[ -z "$REBUILD" ] || node-gyp rebuild --runtime=electron --target=${ELECTRON} --disturl=https://atom.io/download/atom-shell --build-from-source'
4040

41-
script: if [[ -z "$ELECTRON" ]]; then travis_retry npm test; else travis_retry npm run test:electron; fi
41+
script: if [[ -z "$ELECTRON" ]]; then travis_retry npm run coverage; else travis_retry npm run test:electron; fi
42+
43+
after_success:
44+
- 'if [[ $DEPLOY == true ]]; then bash <(curl -s https://codecov.io/bash); fi'
4245

4346
deploy:
4447
provider: script

codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
comment:
2+
layout: header, changes, diff
3+
coverage:
4+
status:
5+
patch:
6+
default:
7+
target: auto
8+
project:
9+
default:
10+
target: auto

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
"prebuild": "^4.2.2"
1515
},
1616
"devDependencies": {
17+
"codecov": "^1.0.1",
1718
"electron-mocha": "^3.1.1",
1819
"jsdoc": "^3.4.2",
1920
"mocha": "^3.1.0",
21+
"nyc": "^8.3.1",
2022
"semver": "^5.3.0",
2123
"should": "^11.1.0"
2224
},
@@ -27,7 +29,9 @@
2729
"install": "prebuild --install",
2830
"build:docs": "jsdoc -R README.md -d docs lib/*.js",
2931
"test": "mocha --expose-gc --slow 300 --timeout 4000",
30-
"test:electron": "electron-mocha --slow 300 --timeout 4000"
32+
"test:electron": "electron-mocha --slow 300 --timeout 4000",
33+
"precoverage": "nyc npm run test",
34+
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
3135
},
3236
"keywords": [
3337
"zeromq",

0 commit comments

Comments
 (0)