Skip to content

Commit d4dd6da

Browse files
committed
Send coverage info to coveralls
1 parent 08b7d62 commit d4dd6da

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ before_install:
77
- npm install grunt-cli -g
88

99
script:
10-
- grunt
10+
- grunt ci
1111

1212
branches:
1313
only:

Gruntfile.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,14 @@ module.exports = function (grunt) {
138138
build: {
139139
src: ['dist', 'build']
140140
}
141+
},
142+
143+
coveralls: {
144+
library: {
145+
src: 'build/coverage/phantomjs/lcov/lcov.info',
146+
}
141147
}
148+
142149
});
143150

144151
grunt.loadNpmTasks('grunt-contrib-jasmine');
@@ -148,6 +155,7 @@ module.exports = function (grunt) {
148155
grunt.loadNpmTasks('grunt-eslint');
149156
grunt.loadNpmTasks('grunt-browserify');
150157
grunt.loadNpmTasks("grunt-contrib-watch");
158+
grunt.loadNpmTasks("grunt-coveralls");
151159
grunt.loadNpmTasks('grunt-karma');
152160

153161
grunt.registerTask('build', ['browserify', 'uglify']);
@@ -160,4 +168,9 @@ module.exports = function (grunt) {
160168
'jshint',
161169
'jasmine'
162170
]);
171+
172+
grunt.registerTask('ci', [
173+
'default',
174+
'coveralls'
175+
]);
163176
};

karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ module.exports = function (config) {
9494
type: 'text-summary'
9595
},
9696
{
97-
type: 'cobertura',
97+
type: 'lcov',
9898
dir: 'build/coverage',
99-
subdir: normalizationBrowserName("xml")
99+
subdir: normalizationBrowserName("lcov")
100100
},
101101
{
102102
type: 'json',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"grunt-contrib-jasmine": "^1.0.0",
3434
"grunt-contrib-jshint": "^1.0.0",
3535
"grunt-contrib-uglify": "^0.11.1",
36+
"grunt-coveralls": "^1.0.1",
3637
"grunt-eslint": "^18.0.0",
3738
"grunt-karma": "^0.12.1",
3839
"istanbul": "gotwarlost/istanbul.git#source-map",

0 commit comments

Comments
 (0)