Saturday, August 17, 2013

github: grunt with Travis

github: grunt with Travis

It took me some time to get Travis run my jasmine test using grunt. Here
is my .travis.yml file
language: node_js
node_js:
- 0.10
before_script:
- npm install -g grunt-cli
script: grunt test --verbose --force
However, when you do npm init the generated package.json also has a
'scripts' section. Here is a snippet of my package.json file
...
"main": "my-project",
"scripts": {
"test": "grunt test"
},
"repository": {
...
With this package.json grunt works, however, I don't understand why you
have to define your test again for travis in .travis.yml. Is it because I
do something wrong ?

No comments:

Post a Comment