Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Commit

Permalink
feat(coverage): added coveralls reporting for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed May 20, 2016
1 parent 62a3855 commit ce6e18e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ install:
script:
- npm test
- npm run build
after_success:
- npm run coveralls
before_deploy:
- pr-bumper bump
env:
Expand Down
13 changes: 8 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ gulp.task('jasmine', [], () => {
gulp.task('remap-istanbul', [], () => {

let remapIstanbul = require('remap-istanbul/lib/gulpRemapIstanbul');
let fs = require('fs');
let merge = require('gulp-merge-json');
let files = [
'./coverage/browser/js/coverage-final.json',
Expand All @@ -150,12 +151,14 @@ gulp.task('remap-istanbul', [], () => {
.pipe(merge('summary.json'))
.pipe(remapIstanbul({
reports: {
'json': './coverage/summary/ts/coverage.json',
'html': './coverage/summary/ts/html-report',
// 'text-summary': 'text-summary',
'lcovonly': './coverage/summary/ts/lcov.info'
'json': './coverage/summary/coverage.json',
'html': './coverage/summary/html-report',
'text': './coverage/summary/text-summary',
'lcovonly': './coverage/summary/lcov.info'
}
}));
})).on('end', () => {
console.log(fs.readFileSync('./coverage/summary/text-summary').toString());
});
});

gulp.task('nodemon', ['build'], () => {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"start": "gulp nodemon",
"test": "gulp test && karma start && gulp remap-istanbul",
"coveralls": "cat coverage/summary/lcov.info | coveralls",
"build": "gulp compile && webpack --config browser/config/webpack.prod.js --progress --profile --bail",
"postinstall": "typings install"
},
Expand Down Expand Up @@ -40,6 +41,7 @@
"devDependencies": {
"babel-register": "^6.9.0",
"codelyzer": "0.0.19",
"coveralls": "^2.11.9",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
Expand Down

0 comments on commit ce6e18e

Please sign in to comment.