From 8d7d78a89eb88e8c1558af0fef429ae1332e5c5c Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Tue, 24 May 2016 14:41:57 -0400 Subject: [PATCH] build: run coveralls for unit test coverage --- .coveralls.yml | 1 + .travis.yml | 2 ++ package.json | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 00000000..07c49339 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +repo_token: DvrDb09a8vhPlVf6DT4cGBjcFOi6DfZN1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 9d896336..fbc8be0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,3 +18,5 @@ script: - npm run regtest - npm run test - npm run jshint +after_success: + - npm run coveralls \ No newline at end of file diff --git a/package.json b/package.json index bbd99939..d84633a2 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ "test": "mocha -R spec --recursive", "regtest": "./scripts/regtest", "jshint": "jshint --reporter=node_modules/jshint-stylish ./lib", - "coverage": "istanbul cover _mocha -- --recursive" + "coverage": "istanbul cover _mocha -- --recursive", + "coveralls": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --recursive -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" }, "tags": [ "bitcoin", @@ -69,6 +70,8 @@ "benchmark": "1.0.0", "bitcore-p2p": "^1.1.0", "chai": "^3.5.0", + "coveralls": "^2.11.9", + "istanbul": "^0.4.3", "jshint": "^2.9.2", "jshint-stylish": "^2.1.0", "mocha": "^2.4.5",