Skip to content

Commit 6de6a33

Browse files
committed
modified Travis' definition as in node-red project
1 parent 3e85542 commit 6de6a33

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ addons:
88
matrix:
99
include:
1010
- node_js: "10"
11+
script:
12+
- ./node_modules/.bin/grunt && istanbul report text && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage
1113
- node_js: "8"
1214
- node_js: "6"
13-
script:
14-
- istanbul cover ./node_modules/.bin/grunt --report lcovonly && istanbul report text && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage
1515
before_script:
1616
- docker pull swaggerapi/petstore
1717
- docker run -d -e SWAGGER_URL=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore

Gruntfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function (grunt) {
4141
options: {
4242
timeout: 3000
4343
},
44-
coverage: {
44+
all: {
4545
src: [ 'test/**/*_spec.js' ]
4646
}
4747
}
@@ -50,6 +50,6 @@ module.exports = function (grunt) {
5050
grunt.loadNpmTasks('grunt-shell');
5151
grunt.loadNpmTasks('grunt-simple-mocha');
5252
grunt.loadNpmTasks('grunt-mocha-istanbul');
53-
grunt.registerTask('default', ['shell', 'simplemocha']);
54-
grunt.registerTask('coverage', 'Run Istanbul code test coverage task', ['shell', 'mocha_istanbul']);
53+
grunt.registerTask('default', ['shell', 'mocha_istanbul:all']);
54+
grunt.registerTask('coverage', 'Run Istanbul code test coverage task', ['shell', 'mocha_istanbul:all']);
5555
};

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"grunt-shell": "2.1.0",
7272
"grunt-simple-mocha": "0.4.1",
7373
"grunt-mocha-istanbul": "5.0.2",
74+
"istanbul": "0.4.5",
7475
"should": "13.1.3",
7576
"node-red": "0.18.7",
7677
"node-red-node-test-helper": "0.1.8",
@@ -81,5 +82,8 @@
8182
},
8283
"bin": {
8384
"node-red-nodegen": "./bin/node-red-nodegen.js"
85+
},
86+
"scripts": {
87+
"test": "grunt"
8488
}
8589
}

0 commit comments

Comments
 (0)