Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Tests: Code coverage via Istanbul and report to coveralls.io
Browse files Browse the repository at this point in the history
  • Loading branch information
gseguin committed Jan 8, 2014
1 parent 6173fb9 commit f41168a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ node_js:
- 0.8
before_script:
- npm install -g grunt-cli
script: npm run-script ci
branches:
only:
- master
- 1.3-stable
env:
- JQUERIES=1.8.3
- JQUERIES=1.10.2
Expand Down
33 changes: 27 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ module.exports = function( grunt ) {
keepSpecialComments: 0
},
minify: {
files: files.getMinifiedCSSFiles( dist ),
files: files.getMinifiedCSSFiles( dist )
}
},

Expand Down Expand Up @@ -515,7 +515,7 @@ module.exports = function( grunt ) {
content = content.replace( re, "" );
}
return content;
},
}
},
files: {
// WARNING: This will be modified by the config:copy:noversion task
Expand Down Expand Up @@ -636,11 +636,23 @@ module.exports = function( grunt ) {

qunit: {
options: {
timeout: 30000
timeout: 30000,
"--web-security": "no",
coverage: {
baseUrl: ".",
src: [
"js/**/*.js",
"!js/jquery.js",
"!js/**/jquery.ui*.js",
"!js/jquery.hashchange.js"
],
instrumentedFiles: "temp/",
htmlReport: "build/report/coverage",
lcovReport: "build/report/lcov",
linesThresholdPct: 0
}
},

files: {},

http: {
options: {
urls: (function() {
Expand Down Expand Up @@ -716,6 +728,14 @@ module.exports = function( grunt ) {
}
},

coveralls: {
all: {

// LCOV coverage file relevant to every target
src: "build/report/lcov/lcov.info"
}
},

clean: {
dist: [ dist ],
git: [ path.join( dist, "git" ) ],
Expand All @@ -733,7 +753,8 @@ module.exports = function( grunt ) {
grunt.loadNpmTasks( "grunt-contrib-concat" );
grunt.loadNpmTasks( "grunt-contrib-connect" );
grunt.loadNpmTasks( "grunt-contrib-cssmin" );
grunt.loadNpmTasks( "grunt-contrib-qunit" );
grunt.loadNpmTasks( "grunt-coveralls" );
grunt.loadNpmTasks( "grunt-qunit-istanbul" );
grunt.loadNpmTasks( "grunt-contrib-requirejs" );
grunt.loadNpmTasks( "grunt-contrib-uglify" );
grunt.loadNpmTasks( "grunt-git-authors" );
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jQuery Mobile [![Build Status](https://travis-ci.org/jquery/jquery-mobile.png?branch=master)](https://travis-ci.org/jquery/jquery-mobile)
# jQuery Mobile [![Build Status](https://travis-ci.org/jquery/jquery-mobile.png?branch=master)](https://travis-ci.org/jquery/jquery-mobile) [![Coverage Status](https://coveralls.io/repos/jquery/jquery-mobile/badge.png?branch=istanbul)](https://coveralls.io/r/jquery/jquery-mobile?branch=istanbul)

This is the main repository for the jQuery Mobile project. From the [official website](http://jquerymobile.com):

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,21 @@
"devDependencies": {
"async": "0.2.9",
"jsdom": "0.8.3",
"grunt": "0.4.1",
"grunt": "0.4.2",
"grunt-contrib-clean": "0.5.0",
"grunt-contrib-compress": "0.5.2",
"grunt-contrib-concat": "0.3.0",
"grunt-contrib-connect": "0.3.0",
"grunt-contrib-copy": "0.4.1",
"grunt-contrib-cssmin": "0.6.1",
"grunt-contrib-jshint": "0.6.3",
"grunt-contrib-qunit": "0.2.2",
"grunt-contrib-requirejs": "0.4.1",
"grunt-contrib-uglify": "0.2.6",
"grunt-coveralls": "0.1.0",
"grunt-git-authors": "1.2.0",
"grunt-qunit-junit": "0.1.0-alpha2",
"grunt-hash-manifest": "0.4.0",
"grunt-qunit-istanbul": "0.3.0",
"optimist": "0.6.0",
"requirejs": "2.1.8",
"scp": "0.0.3",
Expand All @@ -52,6 +53,7 @@
"node": ">= 0.8.0"
},
"scripts": {
"ci": "grunt test && grunt coveralls",
"test": "grunt test",
"lint": "grunt jshint"
},
Expand Down

0 comments on commit f41168a

Please sign in to comment.