Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

Improve coveralls in travis build #293

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@ install:
- npm install

script:
- NODE_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- NODE_ENV=test npm run coverage
- NODE_ENV=test npm run lint

after_script:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![IRC](https://img.shields.io/badge/Slack-IRC-green.svg)](https://anvilresearch.slack.com/account/gateways)

[![Build Status](https://travis-ci.org/anvilresearch/connect.svg?branch=master)](https://travis-ci.org/anvilresearch/connect)
[![Coverage Status](https://coveralls.io/repos/anvilresearch/connect/badge.svg?branch=master&service=github)](https://coveralls.io/github/anvilresearch/connect?branch=master)
![Dependencies](https://img.shields.io/david/anvilresearch/connect.svg) ![License](https://img.shields.io/github/license/anvilresearch/connect.svg) ![Downloads](https://img.shields.io/npm/dm/anvil-connect.svg)
![npm](https://img.shields.io/npm/v/anvil-connect.svg)

Expand Down Expand Up @@ -77,4 +78,3 @@ Support and consulting also available, contact us via [the website](http://anvil
## MIT License

Copyright (c) 2015 [Anvil Research, Inc.](http://anvil.io)

13 changes: 13 additions & 0 deletions coverage.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/bin/bash
# This script was used by package.json during `npm run coverage`
#
# Initially this was done to have our unit tests and integration
# tests run seperately while still combining their coverage data.
#
# One reason to was that the tests were failing when run together.
# Now something has changed and this is no longer the case.
#
# Since we want to be able to run all tests at once it makes
# sense to do this during the build so regressions will fail the
# build.
#
# This script remains useful during development.

set -e

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"test-integration": "mocha test/integration",
"test-integration-watch": "mocha test/integration --watch",
"test-all": "mocha test/unit && mocha test/integration",
"coverage": "./coverage.sh"
"coverage": "NODE_ENV=test istanbul cover _mocha -- test/"
},
"main": "server.js",
"license": "MIT",
Expand Down