switch to codecov.io

This commit is contained in:
Evan You 2015-06-14 14:41:28 -04:00
parent 82c3127813
commit 509f381cb8
3 changed files with 22 additions and 9 deletions

View File

@ -0,0 +1,18 @@
module.exports = function (grunt) {
grunt.registerTask('codecov', function () {
var done = this.async()
var sendToCodeCov = require('codecov.io/lib/sendToCodeCov.io.js')
var coverage = require('fs').readFileSync('coverage/lcov.info', 'utf-8')
sendToCodeCov(coverage, function (err) {
if (err) {
console.log("error sending to codecov.io: ", err, err.stack);
if (/non-success response/.test(err.message)){
console.log("detail: ", err.detail);
}
}
done()
})
})
}

View File

@ -68,16 +68,10 @@ module.exports = function (grunt) {
sauce3: {
options: sauceConfig.batch3
}
},
coveralls: {
cover: {
src: 'coverage/lcov.info'
}
}
})
// load npm tasks
grunt.loadNpmTasks('grunt-contrib-jshint')
grunt.loadNpmTasks('grunt-karma')
@ -86,6 +80,7 @@ module.exports = function (grunt) {
// load custom tasks
require('./build/grunt-tasks/build')(grunt)
require('./build/grunt-tasks/casper')(grunt)
require('./build/grunt-tasks/codecov')(grunt)
require('./build/grunt-tasks/release')(grunt)
// register composite tasks
@ -93,7 +88,7 @@ module.exports = function (grunt) {
grunt.registerTask('cover', ['karma:coverage'])
grunt.registerTask('test', ['unit', 'cover', 'casper'])
grunt.registerTask('sauce', ['karma:sauce1', 'karma:sauce2', 'karma:sauce3'])
grunt.registerTask('ci', ['jshint', 'cover', /*'coveralls',*/ 'build', 'casper', 'sauce'])
grunt.registerTask('ci', ['jshint', 'cover', 'codecov', 'build', 'casper', 'sauce'])
grunt.registerTask('default', ['jshint', 'build', 'test'])
grunt.registerTask('debug', ['coveralls', 'build'])

View File

@ -22,9 +22,9 @@
},
"devDependencies": {
"casperjs": "^1.1.0-beta3",
"codecov.io": "^0.1.2",
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.10.0",
"grunt-coveralls": "^1.0.0",
"grunt-karma": "^0.8.3",
"jshint-stylish": "^0.3.0",
"karma": "^0.12.31",