Skip to content

Commit

Permalink
add coveralls badge
Browse files Browse the repository at this point in the history
  • Loading branch information
yamalight committed Aug 12, 2014
1 parent 141367b commit a1326d7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repo_token: 07sOKiIpFSLPIiTEvq0VYCRutEws7WOsi
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![Build Status](https://travis-ci.org/GeoKnow/Jassa-Core.png?branch=master)](https://travis-ci.org/GeoKnow/Jassa-Core)
[![Code Climate](https://codeclimate.com/github/GeoKnow/Jassa-Core.png)](https://codeclimate.com/github/GeoKnow/Jassa-Core)
[![Dependency Status](https://gemnasium.com/GeoKnow/Jassa-Core.png)](https://gemnasium.com/GeoKnow/Jassa-Core)
[![Dependency Status](https://gemnasium.com/GeoKnow/Jassa-Core.png)](https://gemnasium.com/GeoKnow/Jassa-Core)
[![Coverage Status](https://coveralls.io/repos/GeoKnow/Jassa-Core/badge.png)](https://coveralls.io/r/GeoKnow/Jassa-Core)

## Terminology

Expand Down
17 changes: 17 additions & 0 deletions gulp/tasks/coveralls.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// var cmd = 'istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage';

var gulp = require('gulp');
var istanbul = require('gulp-istanbul');
var mocha = require('gulp-mocha');
var shell = require('gulp-shell');

module.exports = function() {
return gulp.src(['lib/**/*.js'])
.pipe(istanbul()) // Covering files
.on('finish', function() {
gulp.src(['test/**/*.js'])
.pipe(mocha({reporter: 'spec', report: 'lcovonly'}))
.pipe(istanbul.writeReports())
.pipe(shell('cat ./coverage/lcov.info | ./node_modules/.bin/coveralls')); // Creating the reports after tests runned
});
};
2 changes: 2 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ var gulp = require('./gulp')([
'jscs',
'docs',
'browserify',
'coveralls',
]);

gulp.task('lint', ['jshint', 'jscs']);
gulp.task('test', ['lint', 'mocha', 'coverage']);
gulp.task('fulltest', ['test', 'coveralls']);
gulp.task('build', ['browserify']);
gulp.task('default', ['test']);
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "JAvascript Suite for Sparql Access",
"main": "./lib/index.js",
"scripts": {
"test": "gulp test",
"test": "gulp fulltest",
"precommit": "gulp lint",
"prepush": "gulp mocha"
},
Expand All @@ -24,13 +24,16 @@
"devDependencies": {
"bluebird": "^2.2.2",
"browserify": "^5.9.3",
"coveralls": "^2.11.1",
"gulp": "^3.8.7",
"gulp-istanbul": "^0.2.1",
"gulp-jscs": "^1.1.0",
"gulp-jsdoc": "^0.1.4",
"gulp-jshint": "^1.8.4",
"gulp-mocha": "^0.5.2",
"gulp-shell": "^0.2.9",
"husky": "^0.6.0",
"mocha-lcov-reporter": "0.0.1",
"request": "^2.40.0",
"should": "^4.0.4",
"uglifyify": "^2.5.0",
Expand Down

0 comments on commit a1326d7

Please sign in to comment.