-
Notifications
You must be signed in to change notification settings - Fork 71.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nightscout/dev
Dev
- Loading branch information
Showing
158 changed files
with
14,122 additions
and
3,682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
language: node_js | ||
sudo: false | ||
node_js: | ||
- "0.10" | ||
- "0.11" | ||
matrix: | ||
allow_failures: | ||
- node_js: "0.11" | ||
services: | ||
- mongodb | ||
before_script: | ||
- sleep 10 | ||
- echo mongo mongo_travis | ||
script: | ||
- make travis | ||
- "0.10" | ||
- "0.12" | ||
services: mongodb | ||
script: make travis | ||
after_script: make report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,51 @@ | ||
|
||
# Nightscout tests/builds/analysis | ||
TESTS=tests/*.js | ||
MONGO_CONNECTION?=mongodb://localhost/test_db | ||
CUSTOMCONNSTR_mongo_settings_collection?=test_settings | ||
CUSTOMCONNSTR_mongo_collection?=test_sgvs | ||
MONGO_SETTINGS=MONGO_CONNECTION=${MONGO_CONNECTION} \ | ||
CUSTOMCONNSTR_mongo_collection=${CUSTOMCONNSTR_mongo_collection} \ | ||
CUSTOMCONNSTR_mongo_settings_collection=${CUSTOMCONNSTR_mongo_settings_collection} | ||
CUSTOMCONNSTR_mongo_collection=${CUSTOMCONNSTR_mongo_collection} | ||
|
||
# XXX.bewest: Mocha is an odd process, and since things are being | ||
# wrapped and transformed, this odd path needs to be used, not the | ||
# normal wrapper. When ./node_modules/.bin/mocha is used, no coverage | ||
# information is generated. This happens because typical shell | ||
# wrapper performs process management that mucks with the test | ||
# coverage reporter's ability to instrument the tests correctly. | ||
# Hard coding it to the local with our pinned version is bigger for | ||
# initial installs, but ensures a consistent environment everywhere. | ||
# On Travis, ./node_modules/.bin and other `nvm` and `npm` bundles are | ||
# inserted into the default `$PATH` enviroinment, making pointing to | ||
# the unwrapped mocha executable necessary. | ||
MOCHA=./node_modules/mocha/bin/_mocha | ||
# Pinned from dependency list. | ||
ISTANBUL=./node_modules/.bin/istanbul | ||
ANALYZED=./coverage/lcov.info | ||
export CODACY_REPO_TOKEN=e29ae5cf671f4f918912d9864316207c | ||
|
||
all: test | ||
|
||
travis-cov: | ||
NODE_ENV=test \ | ||
${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 | ||
coverage: | ||
NODE_ENV=test ${MONGO_SETTINGS} \ | ||
${ISTANBUL} cover ${MOCHA} -- -R tap ${TESTS} | ||
|
||
report: | ||
test -f ${ANALYZED} && \ | ||
(npm install coveralls && cat ${ANALYZED} | \ | ||
./node_modules/.bin/coveralls) || echo "NO COVERAGE" | ||
test -f ${ANALYZED} && \ | ||
(npm install codecov.io && cat ${ANALYZED} | \ | ||
./node_modules/codecov.io/bin/codecov.io.js) || echo "NO COVERAGE" | ||
test -f ${ANALYZED} && \ | ||
(npm install codacy-coverage && cat ${ANALYZED} | \ | ||
YOURPACKAGE_COVERAGE=1 ./node_modules/codacy-coverage/bin/codacy-coverage.js) || echo "NO COVERAGE" | ||
|
||
test: | ||
${MONGO_SETTINGS} \ | ||
mocha --verbose -vvv -R tap ${TESTS} | ||
${MONGO_SETTINGS} ${MOCHA} -R tap ${TESTS} | ||
|
||
travis: test travis-cov | ||
travis: | ||
NODE_ENV=test ${MONGO_SETTINGS} \ | ||
${ISTANBUL} cover ${MOCHA} --report lcovonly -- -R tap ${TESTS} | ||
|
||
.PHONY: test | ||
.PHONY: all coverage report test travis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: node server.js | ||
web: ./node_modules/.bin/forever --minUptime 100 -c node server.js |
Oops, something went wrong.