Skip to content

Commit f32c781

Browse files
KatsuyaHoshiiHiroyasuNishiyama
authored andcommitted
modified Travis' definition as in node-red project (#72)
1 parent 6b88422 commit f32c781

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-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
@@ -122,7 +122,7 @@ module.exports = function (grunt) {
122122
options: {
123123
timeout: 10000
124124
},
125-
coverage: {
125+
all: {
126126
src: [ 'test/**/*_spec.js' ]
127127
}
128128
}
@@ -131,6 +131,6 @@ module.exports = function (grunt) {
131131
grunt.loadNpmTasks('grunt-shell');
132132
grunt.loadNpmTasks('grunt-simple-mocha');
133133
grunt.loadNpmTasks('grunt-mocha-istanbul');
134-
grunt.registerTask('default', ['shell', 'simplemocha']);
135-
grunt.registerTask('coverage', 'Run Istanbul code test coverage task', ['shell', 'mocha_istanbul']);
134+
grunt.registerTask('default', ['shell', 'mocha_istanbul:all']);
135+
grunt.registerTask('coverage', 'Run Istanbul code test coverage task', ['shell', 'mocha_istanbul:all']);
136136
};

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,8 @@
100100
},
101101
"bin": {
102102
"node-red-nodegen": "./bin/node-red-nodegen.js"
103+
},
104+
"scripts": {
105+
"test": "grunt"
103106
}
104107
}

0 commit comments

Comments
 (0)