diff --git a/.travis.yml b/.travis.yml index d0cadb38dba9ed4c248fc941c9ebfe4c5547b5cb..702ad8f65955fbe9e5f2920282dcc16798c6b5b2 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 898ff698d850924df37431e53bb0d9685b3f059c..459add68ad569c499ac25ecf50277f30a0a322da 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",