Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit e313c6b

Browse files
committed
Merge pull request #202 from angular-ui/coverallsmerge
chore(travis): use karma-coveralls for coverage reports
2 parents 011293b + 4a0fdd3 commit e313c6b

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ env:
3737
- secure: Cy34UQZ7/9toUKV6905XYeXIaFdDRhLb+ibEbLnjoo3ifeApNaecc1l4aBN88HN6nKnX1TKSZyiETwCpCWCee2d7KTi4IhSFTAa+SVUTV6BmikhdUs6MwemyreyWFlxZD32huZKyWU9ZEAwwQ0Oq9gPqECWWZkdT4LInF6SLWLY=
3838
- secure: E9gahGC9Swvy83Kos9LhFsxZp/zBI6Ll9lqQd6HxT7YSXj2YeoxSMCsF629bODPdtuMirhmFqReKZKL1lDpJBswr1sFtnmVavSwVBW4v/CIAQu0ENC85Knv1wgoAcl7cRisWaueSHJ0DyNstZZWGNWryIINg9zjFdrOSztDvoN8=
3939
- secure: UxCvWwq2GcUdL3BtJyRMEFPHPRGIdPPLthThmWrmUE7dnblpDUdWVXKc62f7Y42qtHlhYh1EjxX0GJFcS1F0Lfge0e0cxDNWBATBoLKpC67kTyz/cUgqFEv6tsbkziBtbOrBuy6/LMZly1BqG/3fIDEJezkKOIqHF+pdApvAC/8=
40+
- secure: LY+rU4ouy35DfnXdTumu+lPQsMPzNWQktXlms1YG1jWqOs7As223fLQAFe5tyVs34K0xQsPCq3whfaDCd4ZNVYLO3srsXSuRpDw8DRt1fQhhVJo8IBI+Yv92FiFZr54BsBxM4Wzt8hFWEzDlIgziOYSriSXMuBomMHXbtm5vkzg=

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# UI.Sortable directive [![Build Status](https://travis-ci.org/angular-ui/ui-sortable.png)](https://travis-ci.org/angular-ui/ui-sortable)
1+
# 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)
22

33
This directive allows you to sort an array with drag & drop.
44

gruntFile.js

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,19 @@ module.exports = function(grunt) {
3939
// HACK TO MAKE TRAVIS WORK
4040
var testConfig = function(configFile, customOptions) {
4141
var options = { configFile: configFile, singleRun: true };
42-
var travisOptions = process.env.TRAVIS && { browsers: ['Firefox', 'PhantomJS'], reporters: ['dots'] };
42+
var travisOptions = process.env.TRAVIS && {
43+
browsers: ['Firefox', 'PhantomJS'],
44+
reporters: ['dots', 'coverage', 'coveralls'],
45+
preprocessors: { 'src/*.js': ['coverage'] },
46+
coverageReporter: {
47+
reporters: [{
48+
type: 'text'
49+
}, {
50+
type: 'lcov',
51+
dir: 'coverage/'
52+
}]
53+
},
54+
};
4355
return grunt.util._.extend(options, customOptions, travisOptions);
4456
};
4557
//
@@ -68,6 +80,16 @@ module.exports = function(grunt) {
6880
continuous: { options: { keepalive: false } }
6981
},
7082

83+
coveralls: {
84+
options: {
85+
coverage_dir: 'coverage/',
86+
// debug: true
87+
// dryRun: true,
88+
// force: true,
89+
// recursive: true
90+
}
91+
},
92+
7193
karma: {
7294
unit: testConfig('test/karma.conf.js'),
7395
server: {configFile: 'test/karma.conf.js'},
@@ -77,8 +99,12 @@ module.exports = function(grunt) {
7799
reporters: ['progress', 'coverage'],
78100
preprocessors: { 'src/*.js': ['coverage'] },
79101
coverageReporter: {
80-
type : 'html',
81-
dir : 'coverage/'
102+
reporters: [{
103+
type: 'text'
104+
}, {
105+
type: 'lcov',
106+
dir: 'coverage/'
107+
}]
82108
},
83109
singleRun: true
84110
},

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"karma": "0.10.x",
2222
"karma-chrome-launcher": "0.1.x",
2323
"karma-coffee-preprocessor": "0.1.x",
24-
"karma-coverage": "~0.1",
24+
"karma-coverage": "~0.2.0",
25+
"karma-coveralls": "~0.1.4",
2526
"karma-firefox-launcher": "0.1.x",
2627
"karma-html2js-preprocessor": "0.1.x",
2728
"karma-jasmine": "0.1.x",

0 commit comments

Comments
 (0)