Permalink
Browse files

Publish to coveralls.io from travis

  • Loading branch information...
1 parent 197b41d commit deb39b8f346b436ed87dc841e862bd02ff059c9c @itsmonktastic itsmonktastic committed with sheerun Apr 17, 2014
Showing with 16 additions and 3 deletions.
  1. +2 −0 .travis.yml
  2. +5 −1 Gruntfile.js
  3. +3 −1 README.md
  4. +4 −0 lib/commands/index.js
  5. +2 −1 package.json
View
2 .travis.yml
@@ -7,3 +7,5 @@ matrix:
- node_js: '0.11'
before_script:
- npm install -g grunt-cli
+script:
+ - grunt travis
View
6 Gruntfile.js
@@ -39,7 +39,10 @@ module.exports = function (grunt) {
command: 'node test/packages.js --force && node test/packages-svn.js --force'
},
cover: {
- command: 'node node_modules/istanbul/lib/cli.js cover --dir ./test/reports node_modules/mocha/bin/_mocha -- -R dot test/test.js'
+ command: 'STRICT_REQUIRE=1 node node_modules/istanbul/lib/cli.js cover --dir ./test/reports node_modules/mocha/bin/_mocha -- -R dot test/test.js'
+ },
+ coveralls: {
+ command: 'node node_modules/.bin/coveralls < test/reports/lcov.info'
}
},
watch: {
@@ -51,5 +54,6 @@ module.exports = function (grunt) {
grunt.registerTask('assets', ['exec:assets-force']);
grunt.registerTask('test', ['jshint', 'exec:assets', 'simplemocha:full']);
grunt.registerTask('cover', 'exec:cover');
+ grunt.registerTask('travis', ['jshint', 'exec:assets', 'exec:cover', 'exec:coveralls']);
grunt.registerTask('default', 'test');
};
View
4 README.md
@@ -1,4 +1,6 @@
-# Bower [![Build Status](https://travis-ci.org/bower/bower.svg?branch=master)](https://travis-ci.org/bower/bower)
+# Bower
+
+[![Build Status](https://travis-ci.org/bower/bower.svg?branch=master)](https://travis-ci.org/bower/bower) [![Coverage Status](https://coveralls.io/repos/bower/bower/badge.png?branch=feature%2Fintegration)](https://coveralls.io/r/bower/bower?branch=feature%2Fintegration)
<img align="right" height="300" src="http://bower.io/img/bower-logo.png">
View
4 lib/commands/index.js
@@ -9,6 +9,10 @@ var Logger = require('bower-logger');
* return as soon as possible and load and execute the command asynchronously.
*/
function commandFactory(id) {
+ if (process.env.STRICT_REQUIRE) {
+ require(id);
+ }
+
function command() {
var commandArgs = [].slice.call(arguments);
View
3 package.json
@@ -69,7 +69,8 @@
"load-grunt-tasks": "~0.4.0",
"mocha": "~1.20.1",
"nock": "~0.34.1",
- "proxyquire": "~1.0.1"
+ "proxyquire": "~1.0.1",
+ "coveralls": "~2.10.0"
},
"scripts": {
"test": "grunt test"

0 comments on commit deb39b8

Please sign in to comment.