Skip to content

Commit

Permalink
Travis, run the coveralls target
Browse files Browse the repository at this point in the history
Change-Id: Icb29e27b8c83c252b4c2f076328e88ff23ec15db
  • Loading branch information
diversario committed Jun 8, 2013
1 parent d881fa0 commit ef2ec77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Makefile
Expand Up @@ -2,19 +2,20 @@ REPORTER = spec

test:
@mocha --reporter $(REPORTER)
@$(MAKE) coverage

coverage:
@rm -rf lib-cov reports
@$(MAKE) clean
@mkdir reports
@istanbul instrument --output lib-cov lib
@ISTANBUL_REPORTERS=lcov CONNECT_MONGOSTORE_COV=1 mocha -R mocha-istanbul -t 20s $(TESTS)
@mv lcov.info reports
@mv lcov-report reports
@if [ $TRAVIS == "true" ]; then cat reports/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi

coveralls: test coverage
@cat reports/lcov.info | ./node_modules/coveralls/bin/coveralls.js
@$(MAKE) clean

clean:
@rm -rf lib-cov
@rm -rf lib-cov reports

.PHONY: test test-cov coverage
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -33,7 +33,7 @@
"mongoose": ">= 2.6.x"
},
"scripts": {
"test": "make test"
"test": "make coveralls"
},
"main": "index",
"engines": "node >= 0.8.x"
Expand Down

0 comments on commit ef2ec77

Please sign in to comment.