Skip to content

Commit

Permalink
Started messing with gulp and coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
codydaig committed Jul 21, 2015
1 parent 97cede8 commit dccb0d5
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ node_js:
- '0.12'
- 'iojs'
services:
- cassandra
- cassandra
script: "npm run-script test-travis"
after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
22 changes: 22 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var gulp = require('gulp');
var gls = require('gulp-live-server');
var mocha = require('gulp-mocha');
var gutil = require('gulp-util');
var coveralls = require('gulp-coveralls');

gulp.task('default', function() {
var server = gls.new('./compiled-js/index.js');
server.start();
});

gulp.task('coverage', function(){
return gulp.src('test/coverage/**/lcov.info')
.pipe(coveralls());
});

gulp.task('test', ['coverage'], function(){
return gulp.src(['./test/**/*.js'], { read: false })
.pipe(mocha({
reporter: 'spec'
}));
});
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "ORM for any DB",
"main": "index.js",
"scripts": {
"test": "./node_modules/mocha/bin/mocha"
"test": "./node_modules/mocha/bin/mocha",
"test-travis": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*"
},
"repository": {
"type": "git",
Expand All @@ -18,6 +19,16 @@
"homepage": "https://github.com/codydaig/humongo#readme",
"dependencies": {
"chai": "^3.2.0",
"gulp": "^3.9.0",
"mocha": "^2.2.5"
},
"devDependencies": {
"coveralls": "^2.11.3",
"gulp-coveralls": "^0.1.4",
"gulp-live-server": "0.0.23",
"gulp-mocha": "^2.1.3",
"gulp-util": "^3.0.6",
"istanbul": "^0.3.17",
"mocha-lcov-reporter": "0.0.2"
}
}

0 comments on commit dccb0d5

Please sign in to comment.