Skip to content

Commit 925f162

Browse files
switched to codecov
1 parent ae8908c commit 925f162

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

.codecov.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"token": "ec8299ff-eca6-4b71-9da0-12efcb724143"
3+
}

sharedGruntConfig.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ module.exports = (grunt, dir, dependencies, type, lib) => {
6767
// grunt.registerTask('build-spec', ['tslint:spec', 'ts:test']);
6868
grunt.registerTask('build-base', ['clean:dist', 'clean:docs', 'build-html', 'build-css', 'copy:bin', 'copy:example', 'build-js']);
6969
switch(type) {
70-
case 'node':grunt.registerTask('buildMin', ['build-base', 'doc', 'test', 'coverageReport']);
70+
case 'node':grunt.registerTask('buildMin', ['build-base', 'doc', 'test']);
7171
grunt.registerTask('buildDev', ['build-base']);
7272
break;
73-
case 'lib': grunt.registerTask('buildMin', ['build-base', 'webpack:appDev', 'webpack:appProd', 'doc', 'test', 'coverageReport']);
73+
case 'lib': grunt.registerTask('buildMin', ['build-base', 'webpack:appDev', 'webpack:appProd', 'doc', 'test']);
7474
grunt.registerTask('buildDev', ['build-base', 'webpack:appDev']);
7575
break;
76-
default: grunt.registerTask('buildMin', ['build-base', 'webpack:appDev', 'webpack:appProd', 'doc', 'test', 'coverageReport']);
76+
default: grunt.registerTask('buildMin', ['build-base', 'webpack:appDev', 'webpack:appProd', 'doc', 'test']);
7777
grunt.registerTask('buildDev', ['build-base', 'webpack:appDev']);
7878
}
7979

@@ -82,7 +82,7 @@ module.exports = (grunt, dir, dependencies, type, lib) => {
8282
grunt.registerTask('dev', ['buildDev', 'stage']);
8383
grunt.registerTask('product', ['buildMin', 'stage']);
8484
// grunt.registerTask('travis', ['build-base', (type === 'node')?'':'webpack:appProd', 'test']); // exlude node-apps from webPack to avoid webpack error
85-
grunt.registerTask('travis', ['build-base', 'test', 'coverageReport']); // exlude node-apps from webPack to avoid webpack error
85+
grunt.registerTask('travis', ['build-base', 'test', 'coverageReport']);
8686
grunt.registerTask('help', ['h']);
8787

8888
grunt.registerMultiTask('sourceCode', translateSourcesToHTML);
@@ -419,13 +419,14 @@ module.exports = (grunt, dir, dependencies, type, lib) => {
419419

420420
function codecov() {
421421
const cp = require('child_process');
422-
const codecov = require('./.codecov.json');
423-
if (codecov) {
424-
const token = codecov.token;
425-
const result = cp.spawnSync(`bash <(curl -s https://codecov.io/bash) -t ${token}`, {stdio: 'inherit', shell:'/bin/bash'});
426-
console.log(`status: ${result.status}\noutput: ${result.stdout}\nerror: ${result.stderr}`);
427-
if (result.stderr) { console.log(`error: ${result.stderr}`); }
428-
}
422+
try {
423+
const codecov = require('./.codecov.json');
424+
if (codecov) {
425+
const result = cp.spawnSync(`bash <(curl -s https://codecov.io/bash) -t ${codecov.token}`, {stdio: 'inherit', shell:'/bin/bash'});
426+
console.log(`status: ${result.status}`);
427+
if (result.stderr) { console.log(`error: ${result.stderr}`); }
428+
}
429+
} catch(e) {}
429430
}
430431

431432
function writeIndexJson() {

0 commit comments

Comments
 (0)