Skip to content

Commit 8329be6

Browse files
authored
Merge pull request #68 from lgeiger/codecov
Hello codecov
2 parents 984cb97 + 0a17f86 commit 8329be6

File tree

5 files changed

+26
-3
lines changed

5 files changed

+26
-3
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 && $TRAVIS_OS_NAME == linux]]; then bash <(curl -s https://codecov.io/bash); fi'
4245

4346
deploy:
4447
provider: script

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# zmq-prebuilt
22

3+
[![codecov](https://codecov.io/gh/nteract/zmq-prebuilt/branch/master/graph/badge.svg)](https://codecov.io/gh/nteract/zmq-prebuilt)
34
[![](https://img.shields.io/badge/version-latest-blue.svg)](https://github.com/nteract/zmq-prebuilt)
45
[![Build Status](https://travis-ci.org/nteract/zmq-prebuilt.svg?branch=master)](https://travis-ci.org/nteract/zmq-prebuilt)
56
[![Build status](https://ci.appveyor.com/api/projects/status/6u7saauir2msxpou?svg=true)](https://ci.appveyor.com/project/nteract/zmq-prebuilt)

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: 6 additions & 2 deletions
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
},
@@ -26,8 +28,10 @@
2628
"scripts": {
2729
"install": "prebuild --install",
2830
"build:docs": "jsdoc -R README.md -d docs lib/*.js",
29-
"test": "mocha --expose-gc --slow 300 --timeout 4000",
30-
"test:electron": "electron-mocha --slow 300 --timeout 4000"
31+
"test": "mocha --expose-gc --slow 300",
32+
"test:electron": "electron-mocha --slow 300",
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)