only report coverage to coveralls from travis

this has the nice side effect that `npm test` effectively only runs `mocha` and has proper line numbers in stack traces
This commit is contained in:
jomo 2015-03-27 23:14:30 +01:00
parent af03fb63f8
commit 4dec71c75e
2 changed files with 4 additions and 3 deletions

View File

@ -1,10 +1,10 @@
language: node_js language: node_js
node_js: node_js:
- "iojs-v1.6.0" - "iojs-v1.6.0"
before_script:
- cp "lib/config.example.js" "lib/config.js"
before_install: before_install:
- sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ - sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
script:
- npm run-script test-travis
notifications: notifications:
irc: irc:
channels: channels:

View File

@ -23,7 +23,8 @@
"scripts": { "scripts": {
"postinstall": "cp 'lib/config.example.js' 'lib/config.js'", "postinstall": "cp 'lib/config.example.js' 'lib/config.js'",
"start": "forever -l logs/log.log -o logs/out.log -e logs/error.log -p ./ -a --minUptime 8000 --spinSleepTime 1500 lib/www.js", "start": "forever -l logs/log.log -o logs/out.log -e logs/error.log -p ./ -a --minUptime 8000 --spinSleepTime 1500 lib/www.js",
"test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" "test": "mocha",
"test-travis": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
}, },
"engines": { "engines": {
"iojs": "1.6.x" "iojs": "1.6.x"