Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coverage settings #180

Merged
merged 2 commits into from
Dec 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ bower_components/
.idea/
*.swp
*.vim

# --------------------
# coverage
# --------------------
coverage
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ matrix:
fast_finish: true
# allow_failures:
after_success:
- coveralls
- grunt cov
10 changes: 10 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ module.exports = function(grunt) {
angular1_4: {
configFile: 'config/karma.conf.angular.1.4.js'
}
},
coveralls: {
options: {
debug: true,
coverageDir: 'coverage',
dryRun: false,
force: true,
recursive: true
}
}
});

Expand All @@ -99,4 +108,5 @@ module.exports = function(grunt) {
grunt.registerTask('check', ['jshint', 'jsbeautifier']); // use this before commit
grunt.registerTask('build', ['check', 'clean', 'concat', 'uglify']);
grunt.registerTask('test', ['build', 'karma']);
grunt.registerTask('cov', ['coveralls']);
};
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ angular-validation 1.4.0
[![NPM version](https://badge.fury.io/js/angular-validation.svg)](http://badge.fury.io/js/angular-validation)
[![Build Status](https://travis-ci.org/huei90/angular-validation.png?branch=master)](https://travis-ci.org/huei90/angular-validation)
[![Code Climate](https://codeclimate.com/github/huei90/angular-validation/badges/gpa.svg)](https://codeclimate.com/github/huei90/angular-validation)
[![Coverage Status](https://coveralls.io/repos/huei90/angular-validation/badge.svg?branch=master&service=github)](https://coveralls.io/github/huei90/angular-validation?branch=master)
[![devDependency Status](https://david-dm.org/huei90/angular-validation/dev-status.png)](https://david-dm.org/huei90/angular-validation#info=devDependencies)
[![Gitter chat](https://badges.gitter.im/huei90/angular-validation.png)](https://gitter.im/huei90/angular-validation)

Expand All @@ -21,7 +22,7 @@ angularjs 1.4.x support after version angular-validation 1.4.x
Requirement
-----
[AngularJS](http://angularjs.org) 1.2.x (for [angular-validation 1.2.x](https://github.com/huei90/angular-validation/tree/v1.2.x)) <br/>
[AngularJS](http://angularjs.org) 1.3.x (for [angular-validation 1.3.x](https://github.com/huei90/angular-validation/tree/v1.3.x)) <br/>
[AngularJS](http://angularjs.org) 1.3.x (for [angular-validation 1.3.x](https://github.com/huei90/angular-validation/tree/v1.3.x)) <br/>
[AngularJS](http://angularjs.org) 1.4.x (for [angular-validation 1.4.x](https://github.com/huei90/angular-validation/tree/master))

DEMO
Expand Down
13 changes: 10 additions & 3 deletions config/karma.conf.angular.1.3.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ module.exports = function(config) {
exclude: [],

preprocessors: {
'test/*.js': []
'dist/angular-validation.js': ['coverage']
},

// use dots reporter, as travis terminal does not support escaping sequences
// possible values: 'dots', 'progress'
// CLI --reporters progress
reporters: ['progress'],
reporters: ['progress', 'coverage'],

// web server port
// CLI --port 9876
Expand Down Expand Up @@ -68,9 +68,16 @@ module.exports = function(config) {

plugins: [
'karma-jasmine',
'karma-coverage',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher'
]
],

// coverage settings
coverageReporter: {
type: "lcov",
dir: "coverage/"
}
});
};
13 changes: 10 additions & 3 deletions config/karma.conf.angular.1.4.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ module.exports = function(config) {
exclude: [],

preprocessors: {
'test/*.js': []
'dist/angular-validation.js': ['coverage'],
},

// use dots reporter, as travis terminal does not support escaping sequences
// possible values: 'dots', 'progress'
// CLI --reporters progress
reporters: ['progress'],
reporters: ['progress', 'coverage'],

// web server port
// CLI --port 9876
Expand Down Expand Up @@ -68,9 +68,16 @@ module.exports = function(config) {

plugins: [
'karma-jasmine',
'karma-coverage',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher'
]
],

// coverage settings
coverageReporter: {
type: "lcov",
dir: "coverage/"
}
});
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@
"grunt-contrib-watch": "~0.6.1",
"grunt-jsbeautifier": "^0.2.7",
"grunt-karma": "~0.12.1",
"grunt-karma-coveralls": "^2.5.4",
"karma": "~0.13.14",
"karma-chrome-launcher": "~0.2.1",
"karma-coffee-preprocessor": "~0.3.0",
"karma-coverage": "^0.5.3",
"karma-firefox-launcher": "~0.1.2",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.3.5",
Expand Down