diff --git a/.travis.yml b/.travis.yml index 1a2df89..c6d6631 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,3 +37,4 @@ env: - secure: Cy34UQZ7/9toUKV6905XYeXIaFdDRhLb+ibEbLnjoo3ifeApNaecc1l4aBN88HN6nKnX1TKSZyiETwCpCWCee2d7KTi4IhSFTAa+SVUTV6BmikhdUs6MwemyreyWFlxZD32huZKyWU9ZEAwwQ0Oq9gPqECWWZkdT4LInF6SLWLY= - secure: E9gahGC9Swvy83Kos9LhFsxZp/zBI6Ll9lqQd6HxT7YSXj2YeoxSMCsF629bODPdtuMirhmFqReKZKL1lDpJBswr1sFtnmVavSwVBW4v/CIAQu0ENC85Knv1wgoAcl7cRisWaueSHJ0DyNstZZWGNWryIINg9zjFdrOSztDvoN8= - secure: UxCvWwq2GcUdL3BtJyRMEFPHPRGIdPPLthThmWrmUE7dnblpDUdWVXKc62f7Y42qtHlhYh1EjxX0GJFcS1F0Lfge0e0cxDNWBATBoLKpC67kTyz/cUgqFEv6tsbkziBtbOrBuy6/LMZly1BqG/3fIDEJezkKOIqHF+pdApvAC/8= + - secure: LY+rU4ouy35DfnXdTumu+lPQsMPzNWQktXlms1YG1jWqOs7As223fLQAFe5tyVs34K0xQsPCq3whfaDCd4ZNVYLO3srsXSuRpDw8DRt1fQhhVJo8IBI+Yv92FiFZr54BsBxM4Wzt8hFWEzDlIgziOYSriSXMuBomMHXbtm5vkzg= diff --git a/README.md b/README.md index 9e22739..0a74b16 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# UI.Sortable directive [![Build Status](https://travis-ci.org/angular-ui/ui-sortable.png)](https://travis-ci.org/angular-ui/ui-sortable) +# UI.Sortable directive [![Build Status](https://travis-ci.org/angular-ui/ui-sortable.png)](https://travis-ci.org/angular-ui/ui-sortable) [![Coverage Status](https://coveralls.io/repos/angular-ui/ui-sortable/badge.png)](https://coveralls.io/r/angular-ui/ui-sortable) This directive allows you to sort an array with drag & drop. diff --git a/gruntFile.js b/gruntFile.js index d39af98..2b4a5f6 100644 --- a/gruntFile.js +++ b/gruntFile.js @@ -39,7 +39,19 @@ module.exports = function(grunt) { // HACK TO MAKE TRAVIS WORK var testConfig = function(configFile, customOptions) { var options = { configFile: configFile, singleRun: true }; - var travisOptions = process.env.TRAVIS && { browsers: ['Firefox', 'PhantomJS'], reporters: ['dots'] }; + var travisOptions = process.env.TRAVIS && { + browsers: ['Firefox', 'PhantomJS'], + reporters: ['dots', 'coverage', 'coveralls'], + preprocessors: { 'src/*.js': ['coverage'] }, + coverageReporter: { + reporters: [{ + type: 'text' + }, { + type: 'lcov', + dir: 'coverage/' + }] + }, + }; return grunt.util._.extend(options, customOptions, travisOptions); }; // @@ -68,6 +80,16 @@ module.exports = function(grunt) { continuous: { options: { keepalive: false } } }, + coveralls: { + options: { + coverage_dir: 'coverage/', + // debug: true + // dryRun: true, + // force: true, + // recursive: true + } + }, + karma: { unit: testConfig('test/karma.conf.js'), server: {configFile: 'test/karma.conf.js'}, @@ -77,8 +99,12 @@ module.exports = function(grunt) { reporters: ['progress', 'coverage'], preprocessors: { 'src/*.js': ['coverage'] }, coverageReporter: { - type : 'html', - dir : 'coverage/' + reporters: [{ + type: 'text' + }, { + type: 'lcov', + dir: 'coverage/' + }] }, singleRun: true }, diff --git a/package.json b/package.json index f5009f8..c501b71 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "karma": "0.10.x", "karma-chrome-launcher": "0.1.x", "karma-coffee-preprocessor": "0.1.x", - "karma-coverage": "~0.1", + "karma-coverage": "~0.2.0", + "karma-coveralls": "~0.1.4", "karma-firefox-launcher": "0.1.x", "karma-html2js-preprocessor": "0.1.x", "karma-jasmine": "0.1.x",