Skip to content

Commit 923488a

Browse files
committed
chore(test): Added codecov to Travis config, added badge to README file^
1 parent 3624eef commit 923488a

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ before_script:
3030
- sh -e /etc/init.d/xvfb start # Run xvfb to fake a display (muhaha ...)
3131
script:
3232
- npm run gulp test && npm run gulp build--publish # First test, then build for npm publish
33+
after_success:
34+
- npm run coveralls
3335

3436
before_deploy: # Automatic semantic release
3537
- git config --global user.name "dominique-mueller"; # Setup git

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![dev dependency status](https://img.shields.io/david/dev/dominique-mueller/angular-notifier.svg?maxAge=2592000&style=flat-square)](https://david-dm.org/dominique-mueller/angular-notifier?type=dev)
44
[![peer dependency status](https://img.shields.io/david/peer/dominique-mueller/angular-notifier.svg?maxAge=2592000&style=flat-square)](https://david-dm.org/dominique-mueller/angular-notifier?type=peer)
55
[![travis ci build status](https://img.shields.io/travis/dominique-mueller/angular-notifier/master.svg?maxAge=2592000&style=flat-square)](https://travis-ci.org/dominique-mueller/angular-notifier)
6+
[![Codecov](https://img.shields.io/codecov/c/github/dominique-mueller/angular-notifier/master.svg?maxAge=2592000&style=flat-square)]()
67
[![license](https://img.shields.io/npm/l/angular-notifier.svg?maxAge=2592000&style=flat-square)](https://github.com/dominique-mueller/angular-notifier/LICENSE)
78

89
# angular-notifier

karma.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ module.exports = function( config ) {
4545
{
4646
type: 'html', // For viewing in the browser
4747
subdir: '.' // Prevent browser-specific folder naming
48+
},
49+
{
50+
type: 'lcovonly', // For the GitHub badge
51+
subdir: '.'
4852
}
4953
]
5054
},

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"module": "index.js",
3636
"typings": "index.d.ts",
3737
"scripts": {
38-
"gulp": "gulp"
38+
"gulp": "gulp",
39+
"coveralls": "cat ./test-coverage/ts/lcov.info | coveralls"
3940
},
4041
"peerDependencies": {
4142
"@angular/core": "2.x",
@@ -55,6 +56,7 @@
5556
"conventional-github-releaser": "1.1.x",
5657
"conventional-recommended-bump": "0.3.x",
5758
"core-js": "2.4.x",
59+
"coveralls": "2.11.x",
5860
"del": "2.2.x",
5961
"gulp": "github:gulpjs/gulp#4.0",
6062
"gulp-autoprefixer": "3.1.x",

tools/gulp/ts/ts-test.task.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ gulp.task( 'ts:test--coverage', () => {
2929
reports: {
3030
'json': 'test-coverage/ts/coverage.json',
3131
'html': 'test-coverage/ts/', // For viewing in the browser
32+
'lcovonly': 'test-coverage/ts/lcov.info', // For the GitHub badge
3233
'text-summary': null // Print coverage summary to the console
3334
}
3435
} ) );

0 commit comments

Comments
 (0)