Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code coverage using NYC and integrate with codecov #213

Merged
merged 3 commits into from Jan 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -2,3 +2,5 @@
*.log
node_modules
lib
.nyc_output
coverage
18 changes: 17 additions & 1 deletion .travis.yml
Expand Up @@ -3,4 +3,20 @@ node_js:
- 4
- 5
- 6
script: "npm run travis"

cache:
directories:
- node_modules

before_script:
- npm run lint
- npm run prepublish

script:
- npm run test
- npm run system-test
- npm run check-coverage
- npm run report-coverage

after_script:
- npm run codecov
11 changes: 9 additions & 2 deletions package.json
Expand Up @@ -5,8 +5,13 @@
"main": "index.js",
"scripts": {
"prepublish": "rm -rf lib/ && babel src/ --out-dir lib/",
"system-test": "mocha --compilers js:babel-register \"system-test/**/*Test.js\"",
"check-coverage": "npm run cover && nyc check-coverage --statements 80 --branches 80 --functions 80",
"report-coverage": "nyc report --reporter=lcov",
"cover": "nyc npm t",
"codecov": "cat coverage/*/lcov.info | codecov",
"lint": "eslint src/ test/ bin/ *.js",
"test": "npm run prepublish && mocha --compilers js:babel-register \"test/**/*Test.js\"",
"test": "mocha --compilers js:babel-register \"test/**/*Test.js\"",
"watch": "mocha --watch --compilers js:babel-register \"test/transform/**/*Test.js\"",
"travis": "npm run lint && npm run test"
},
Expand Down Expand Up @@ -56,8 +61,10 @@
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.11.6",
"chai": "^3.4.1",
"codecov": "^1.0.1",
"eslint": "^3.3.0",
"eslint-plugin-no-null": "^1.0.1",
"mocha": "^2.3.4"
"mocha": "^2.3.4",
"nyc": "^10.1.2"
}
}
File renamed without changes.