From 69601e46b2d76d14f0da47e3cb34237cb93fe5bf Mon Sep 17 00:00:00 2001 From: sbstjn Date: Sun, 9 Oct 2016 11:45:35 +0200 Subject: [PATCH] Add CircleCI and Coveralls integration --- .gitignore | 1 + .karma.js | 9 +++++++++ Makefile | 3 +++ circle.yml | 5 +++++ package.json | 2 ++ 5 files changed, 20 insertions(+) create mode 100644 circle.yml diff --git a/.gitignore b/.gitignore index d85e7d6..072f894 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .bundle .cache +.cover .DS_Store .jekyll-metadata .sass-cache diff --git a/.karma.js b/.karma.js index 1e6edf1..3dbb69c 100644 --- a/.karma.js +++ b/.karma.js @@ -28,6 +28,15 @@ module.exports = function(config) { transform: [ 'babelify' ] + }, + reporters: [ + 'progress', + 'coverage', + 'coveralls' + ], + coverageReporter: { + type : 'lcov', + dir : '.cover/' } }); }; diff --git a/Makefile b/Makefile index 14900dc..f186d97 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ test: karma karma: @./node_modules/.bin/karma start .karma.js --single-run --reporters progress --log-level disable +cover: + @./node_modules/.bin/karma start .karma.js --single-run + karma-watch: ./node_modules/.bin/karma start .karma.js --reporters progress --log-level disable diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..41aa58d --- /dev/null +++ b/circle.yml @@ -0,0 +1,5 @@ +test: + override: + - make test + post: + - make cover diff --git a/package.json b/package.json index fbc37a9..8f1a195 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,8 @@ "karma": "^1.3.0", "karma-browserify": "^5.1.0", "karma-chrome-launcher": "^2.0.0", + "karma-coverage": "^1.1.1", + "karma-coveralls": "^1.1.2", "karma-jasmine": "^1.0.2", "karma-phantomjs-launcher": "^1.0.2", "uglify-js": "^2.7.3",