Skip to content

Commit

Permalink
Trying to make coverage for server and client at once
Browse files Browse the repository at this point in the history
  • Loading branch information
xseignard committed Dec 10, 2014
1 parent a506750 commit 280a4b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
9 changes: 0 additions & 9 deletions .travis.yml
Expand Up @@ -2,13 +2,4 @@ language: node_js
services: mongodb
node_js:
- "0.10"
before_script:
- npm install -g codeclimate-test-reporter

after_script:
- codeclimate < reports/**/lcov.info

script: make ci

env:
- CODECLIMATE_REPO_TOKEN=dec3f4db135a9088676a04f44bdc4c4857b9012c46b1e2f35801e8ffc5f68678
6 changes: 4 additions & 2 deletions Makefile
Expand Up @@ -28,10 +28,12 @@ coverage:
@# check if reports folder exists, if not create it
@test -d reports || mkdir reports
$(ISTANBUL) cover --dir ./reports $(_MOCHA) -- -R spec $(TESTS)
@# merge client side coeverage in server side lcov
@cat ./reports/phantomjs/lcov.info >> ./reports/lcov.info

codeclimate:
CODECLIMATE_REPO_TOKEN=dec3f4db135a9088676a04f44bdc4c4857b9012c46b1e2f35801e8ffc5f68678 $(CODECLIMATE) < "reports/**/lcov.info"
CODECLIMATE_REPO_TOKEN=dec3f4db135a9088676a04f44bdc4c4857b9012c46b1e2f35801e8ffc5f68678 $(CODECLIMATE) < reports/lcov.info

ci: clean jshint test coverage
ci: clean jshint test coverage codeclimate

.PHONY: clean test back-test front-test jshint coverage codeclimate ci
7 changes: 5 additions & 2 deletions karma.conf.js
Expand Up @@ -8,7 +8,7 @@ module.exports = function(config) {
'public/js/sidlee-client.js',
'test/public/js/sidlee-client.spec.js'
],
browsers: ['PhantomJS', 'Chrome', 'Firefox'],
browsers: ['PhantomJS'],

reporters: ['progress', 'coverage'],

Expand All @@ -18,7 +18,10 @@ module.exports = function(config) {

coverageReporter: {
type : 'lcovonly',
dir : 'reports/'
dir : 'reports/',
subdir: function(browser) {
return browser.toLowerCase().split(/[ /-]/)[0];
}
},

singleRun: true
Expand Down

0 comments on commit 280a4b0

Please sign in to comment.