From 4aafd10a062c7f44ae9907f749f587206358bde4 Mon Sep 17 00:00:00 2001 From: "Zhuohuan LI (CARPE DIEM)" Date: Thu, 27 Oct 2016 04:20:41 +0800 Subject: [PATCH] enable coveralls coverage report --- .travis.yml | 1 + package.json | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d0cadb38..702ad8f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,3 +50,4 @@ notifications: after_success: - if [ "$TRAVIS_OS_NAME" == "linux" ]; then curl -X POST $DOCKER_REBUILD_URL; fi + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then npm run coveralls; fi diff --git a/package.json b/package.json index 898ff698..459add68 100755 --- a/package.json +++ b/package.json @@ -17,13 +17,14 @@ "scripts": { "ts-node": "ts-node", "build": "tsc && shx cp package.json dist/ && shx cp src/puppet-web/*.js dist/src/puppet-web/", + "coveralls": "nyc report --reporter=text-lcov | coveralls", "doctor": "ts-node bin/doctor", "clean": "shx rm -fr dist/*", "lint": "npm run eslint && npm run tslint", "eslint": "eslint \"{bin,example,src,test}/**/*.js\"", "tslint": "tslint \"{bin,example,src,test}/**/*.ts\" && tsc --noEmit", "pretest": "npm run lint && npm run clean && npm run build", - "sloc": "sloc \"{bin,example,src,test,index.ts}\" --details --format cli-table --keys total,source,comment && sloc \"{bin,example,src,test,index.ts}\"", + "sloc": "sloc bin example src test index.ts --details --format cli-table --keys total,source,comment && sloc bin example src test index.ts", "test": "npm run test:chrome", "posttest": "npm run clean && npm run sloc", "test:phantomjs": "cross-env LC_ALL=C WECHATY_LOG=info WECHATY_HEAD=phantomjs ava --timeout=10m \"dist/test/*.spec.js\"", @@ -113,9 +114,11 @@ "ava": "^0.16.0", "babel-eslint": "^6.1.2", "cookie-parser": "^1.4.3", + "coveralls": "^2.11.14", "cross-env": "^2.0.0", "eslint": "^3.4.0", "eslint-plugin-ava": "^3.0.0", + "nyc": "^8.3.2", "qrcode-terminal": "^0.10.0", "shx": "^0.1.4", "sinon": "^1.17.5", -- GitLab