diff --git a/.travis.yml b/.travis.yml index 5dabfd99d31..8053494dd17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,3 +15,5 @@ matrix: script: npm run lint - env: ACTION=test node_js: '6.2' + after_success: + npm run report-coverage diff --git a/h/static/scripts/karma.config.js b/h/static/scripts/karma.config.js index 58067998237..99ffba911c1 100644 --- a/h/static/scripts/karma.config.js +++ b/h/static/scripts/karma.config.js @@ -87,10 +87,11 @@ module.exports = function(config) { }, coverageReporter: { - type : 'html', - - // place this in root of the project - dir : '../../../coverage/', + dir: '../../../coverage/', + reporters: [ + {type:'html'}, + {type:'json', subdir: './'}, + ], }, // Use https://www.npmjs.com/package/karma-mocha-reporter diff --git a/package.json b/package.json index e490a92fea0..30b6ca2814e 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "chai": "^3.5.0", "check-dependencies": "^0.12.0", "classnames": "^2.2.4", + "codecov": "^1.0.1", "coffeeify": "^1.0.0", "commander": "^2.9.0", "core-js": "^1.2.5", @@ -140,6 +141,7 @@ "deps": "check-dependencies", "lint": "eslint .", "test": "gulp test", + "report-coverage": "codecov -f coverage/coverage-final.json", "preversion": "npm run test", "version": "make clean all && ./scripts/update-changelog.js && git add CHANGELOG.md", "postversion": "./scripts/postversion.sh",