diff --git a/.eslintignore b/.eslintignore index 01361ec6ae..69c292c02b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,5 @@ +.nyc_output build -test +coverage lib +test diff --git a/.gitignore b/.gitignore index 0908dd460b..90283a241b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.nyc_output build +coverage lib node_modules diff --git a/.travis.yml b/.travis.yml index 51b4b88403..ff285d0b08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,16 +5,20 @@ sudo: false language: node_js node_js: - - "6" - - "5" - - "4" - - "0.12" + - "6" + - "5" + - "4" + - "0.12" before_script: make bootstrap-babel script: - - npm test - - make test-babel + - npm run test_cov + - make test-babel + +after_success: + - ./node_modules/.bin/nyc report --reporter=lcov > coverage.lcov + - bash <(curl -s https://codecov.io/bash) notifications: slack: babeljs:5Wy4QX13KVkGy9CnU0rmvgeK diff --git a/package.json b/package.json index 13ee637e61..0c9e6b90cc 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "babel-preset-stage-0": "^6.5.0", "kcheck": "^2.0.1", "lodash": "^4.6.1", + "nyc": "^7.0.0", "unicode-9.0.0": "~0.7.0" }, "bin": { @@ -32,8 +33,10 @@ }, "scripts": { "test": "npm run build && npm run lint && ava test/", + "test_cov": "npm run build && npm run lint && nyc ava test/", "lint": "kcheck", "build": "babel src --out-dir lib", + "preversion": "npm run test", "watch": "babel src --out-dir lib --watch" } }