File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,14 @@ set -o pipefail
66# add npm packages to $PATH
77export PATH=$( pwd) /node_modules/.bin:$PATH
88
9+ # set up code coverage instrumentation
10+ rm -rf coverage .nyc_output
11+
912# run linters
1013npm run lint
1114
1215# run unit tests
13- tap --reporter dot test/js/* /* .js
16+ tap --reporter dot --coverage --no-coverage-report test/js/* /* .js
1417
1518# allow writing core files for render tests
1619ulimit -c unlimited -S
@@ -19,7 +22,8 @@ echo '/proc/sys/kernel/core_pattern: '`cat /proc/sys/kernel/core_pattern`
1922sysctl kernel.core_pattern
2023
2124# run render tests
22- node test/render.test.js && node test/query.test.js
25+ istanbul cover --dir .nyc_output --include-pid --report none --print none test/render.test.js &&
26+ istanbul cover --dir .nyc_output --include-pid --report none --print none test/query.test.js
2327EXIT_CODE=$?
2428
2529# collect core dumps from render tests
@@ -31,6 +35,10 @@ for DUMP in $(find ./ -maxdepth 1 -name 'core*' -print); do
3135 rm -rf ${DUMP}
3236done
3337
38+ # send coverage report to coveralls
39+ nyc report --reporter=lcov
40+ node ./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info
41+
3442# return original error code
3543if [[ ${EXIT_CODE} != 0 ]]; then
3644 exit $EXIT_CODE
You can’t perform that action at this time.
0 commit comments