From dcae397d2677f5e4200e9a829ae045df79810532 Mon Sep 17 00:00:00 2001 From: Udo Kramer Date: Tue, 10 Dec 2013 01:57:23 +0100 Subject: [PATCH 1/3] add karma-coverage and coveralls grunt task --- Gruntfile.js | 7 +++++++ karma.conf.js | 9 +++++++-- package.json | 4 +++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8c6991057..468c88bbd 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -605,6 +605,12 @@ module.exports = function(grunt) { ] } } + }, + + coveralls: { + options: { + coverage_dir: 'coverage' + } } }; @@ -624,6 +630,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-cssjanus'); grunt.loadNpmTasks('grunt-clear'); grunt.loadNpmTasks('grunt-karma'); + grunt.loadNpmTasks('grunt-karma-coveralls'); grunt.initConfig(config); diff --git a/karma.conf.js b/karma.conf.js index 2f91ab283..89a716fb5 100755 --- a/karma.conf.js +++ b/karma.conf.js @@ -39,12 +39,17 @@ module.exports = function(config) { ], preprocessors: { - '**/*.html': [] + '**/*.html': [], + 'src/**/*.js': 'coverage' }, // test results reporter to use // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' - reporters: ['spec'], + reporters: ['spec', 'coverage'], + + coverageReporter: { + type: 'lcov' + }, // web server port port: 9999, diff --git a/package.json b/package.json index 3962b0a39..185f636f3 100755 --- a/package.json +++ b/package.json @@ -46,6 +46,8 @@ "grunt-karma": "~0.6.2", "karma-spec-reporter": "0.0.5", "grunt-clear": "~0.2.1", - "grunt-autoprefixer": "~0.4.0" + "grunt-autoprefixer": "~0.4.0", + "grunt-karma-coveralls": "~2.2.0", + "karma-coverage": "~0.1.4" } } From 32250fb4f67c87e40936de2d77776b6dc849f319 Mon Sep 17 00:00:00 2001 From: Udo Kramer Date: Tue, 10 Dec 2013 02:31:07 +0100 Subject: [PATCH 2/3] run grunt-coveralls after travis testing --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d7019ef4d..ba41fbede 100755 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,6 @@ node_js: - "0.10" before_script: - npm install -g grunt-cli - - npm update \ No newline at end of file + - npm update +after_script: + - grunt coveralls \ No newline at end of file From d6ebd5b60ba89a7a6f97b34c71c122f70b6fc072 Mon Sep 17 00:00:00 2001 From: Udo Kramer Date: Tue, 10 Dec 2013 02:36:49 +0100 Subject: [PATCH 3/3] remove some trailing spaces and add coverage badge to README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0a2cf9d77..9931dbc37 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Semantic [![Build Status](https://travis-ci.org/Semantic-Org/Semantic-UI.png)](https://travis-ci.org/Semantic-Org/Semantic-UI) +# Semantic [![Build Status](https://travis-ci.org/Semantic-Org/Semantic-UI.png)](https://travis-ci.org/Semantic-Org/Semantic-UI) [![Coverage Status](https://coveralls.io/repos/optikfluffel/Semantic-UI/badge.png?branch=coveralls-integration)](https://coveralls.io/r/optikfluffel/Semantic-UI?branch=coveralls-integration) Semantic is a UI Component library implemented using a set of specifications designed around natural language Semantic UI is under constant development, so **be sure to check out our [release notes](https://github.com/Semantic-Org/Semantic-UI/blob/master/RELEASE%20NOTES.md) for recent changes**. @@ -8,13 +8,13 @@ Semantic UI is under constant development, so **be sure to check out our [releas > Semantic UI is production ready, but is "pre-release" until build and theming tools are available, and documentation is complete for all components. -Please [share any issues](https://github.com/Semantic-Org/Semantic-UI/issues?state=open) you may have, we need your help to get all the kinks out. +Please [share any issues](https://github.com/Semantic-Org/Semantic-UI/issues?state=open) you may have, we need your help to get all the kinks out. If you are reporting a bug *you must create a test-case*. You can [fork this jsfiddle](http://jsfiddle.net/Vbr9d/42/) to get you started. ## Getting Started -The Semantic library describes many UI elements. In most instances it might be best to build a custom build with only the elements you need. +The Semantic library describes many UI elements. In most instances it might be best to build a custom build with only the elements you need. To download the entire library @@ -31,7 +31,7 @@ If you need help, come hang out in `#semantic-ui` on *irc.freenode.net*. Click #### Right-to-Left (RTL Version) RTL versions are compiled on every patch update, and are available in ``/rtl/`` - + ### Integration Comunity contributed plugins and ports for Wordpress, Angular, Knockout, Rails, and more can be found on the [Integration page](https://github.com/Semantic-Org/Semantic-UI/wiki/Integration).