add coverage report to travis script

resolves #268
This commit is contained in:
Douglas Eichelberger
2015-01-22 19:23:34 -08:00
parent 0a7652add6
commit 034bcefc0f
5 changed files with 24 additions and 26 deletions
+4 -1
View File
@@ -11,4 +11,7 @@ static/bower_components/
.DS_Store
.vagrant
/iisnode
/iisnode
# istanbul output
coverage/
+1 -1
View File
@@ -8,4 +8,4 @@ before_script:
- sleep 10
- echo mongo mongo_travis
script:
- make test
- make travis
+9 -18
View File
@@ -3,32 +3,23 @@ TESTS=tests/*.js
MONGO_CONNECTION?=mongodb://localhost/test_db
CUSTOMCONNSTR_mongo_settings_collection?=test_settings
CUSTOMCONNSTR_mongo_collection?=test_sgvs
BLANKET=--require blanket
MONGO_SETTINGS=MONGO_CONNECTION=${MONGO_CONNECTION} \
CUSTOMCONNSTR_mongo_collection=${CUSTOMCONNSTR_mongo_collection} \
CUSTOMCONNSTR_mongo_settings_collection=${CUSTOMCONNSTR_mongo_settings_collection}
all: test
travis-cov:
NODE_ENV=test node_modules/.bin/mocha ${BLANKET} -R 'travis-cov' ${TESTS}
coveralls:
NODE_ENV=test \
./node_modules/.bin/mocha ${BLANKET} -R mocha-lcov-reporter \
${TESTS} | ./coverall.sh
coverhtml:
./node_modules/.bin/mocha ${BLANKET} -R html-cov ${TESTS} > tests/coverage.html
${MONGO_SETTINGS} \
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -vvv -R tap ${TESTS} && \
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && \
rm -rf ./coverage
test:
MONGO_CONNECTION=${MONGO_CONNECTION} \
CUSTOMCONNSTR_mongo_collection=${CUSTOMCONNSTR_mongo_collection} \
CUSTOMCONNSTR_mongo_settings_collection=${CUSTOMCONNSTR_mongo_settings_collection} \
${MONGO_SETTINGS} \
mocha --verbose -vvv -R tap ${TESTS}
precover:
./node_modules/.bin/mocha ${BLANKET} ${SHOULD} -R html-cov ${TESTS} | w3m -T text/html
travis: test travis-cov coveralls coverhtml
travis: test travis-cov
.PHONY: test
+6 -4
View File
@@ -3,9 +3,10 @@ cgm-remote-monitor (a.k.a. Nightscout)
[![Build Status][build-img]][build-url]
[![Dependency Status][dependency-img]][dependency-url]
[![Coverage Status][coverage-img]][coverage-url]
[![Gitter chat][gitter-img]][gitter-url]
[![Stories in Ready][ready-img]][ready-url]
[![Stories in Progress][progress-img]][progress-url]
[![Stories in Ready][ready-img]][waffle]
[![Stories in Progress][progress-img]][waffle]
[![Deploy to Heroku][heroku-img]][heroku-url]
@@ -25,12 +26,13 @@ Community maintained fork of the
[build-url]: https://travis-ci.org/nightscout/cgm-remote-monitor
[dependency-img]: https://img.shields.io/david/nightscout/cgm-remote-monitor.svg
[dependency-url]: https://david-dm.org/nightscout/cgm-remote-monitor
[coverage-img]: https://img.shields.io/coveralls/nightscout/cgm-remote-monitor/coverage.svg
[coverage-url]: https://coveralls.io/r/nightscout/cgm-remote-monitor?branch=coverage
[gitter-img]: https://img.shields.io/badge/Gitter-Join%20Chat%20%E2%86%92-1dce73.svg
[gitter-url]: https://gitter.im/nightscout/public
[ready-img]: https://badge.waffle.io/nightscout/cgm-remote-monitor.svg?label=ready&title=Ready
[ready-url]: https://waffle.io/nightscout/cgm-remote-monitor
[waffle]: https://waffle.io/nightscout/cgm-remote-monitor
[progress-img]: https://badge.waffle.io/nightscout/cgm-remote-monitor.svg?label=in+progress&title=In+Progress
[progress-url]: https://waffle.io/nightscout/cgm-remote-monitor
[heroku-img]: https://www.herokucdn.com/deploy/button.png
[heroku-url]: https://heroku.com/deploy
[original]: https://github.com/rnpenguin/cgm-remote-monitor
+4 -2
View File
@@ -46,8 +46,10 @@
"git-rev": "git://github.com/bewest/git-rev.git"
},
"devDependencies": {
"supertest": "~0.13.0",
"coveralls": "~2.11.2",
"istanbul": "~0.3.5",
"mocha": "~1.20.1",
"should": "~4.0.4",
"mocha": "~1.20.1"
"supertest": "~0.13.0"
}
}