diff --git a/.travis.yml b/.travis.yml index 1991ff1d..0c77fdd5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,9 @@ addons: - mopidy env: - - TOX_ENV=py27 + # Need to run 'py27' and 'test' together so that we can share coverage reports. + - TOX_ENV=py27,test - TOX_ENV=flake8 - - TOX_ENV=test - TOX_ENV=eslint - TOX_ENV=csslint - TOX_ENV=tidy @@ -33,4 +33,5 @@ script: - "tox -e $TOX_ENV" after_success: - - "if [ $TOX_ENV == 'test' ]; then pip install coveralls; coveralls --merge=.karma_coverage/coverage-final.json; fi" + # We just use 'coveralls-lcov' to convert lcov.info to JSON format. + - "if [ $TOX_ENV == 'py27,test' ]; then gem install coveralls-lcov; coveralls-lcov -v -n .karma_coverage/lcov.info > .karma_coverage/lcov.json; pip install coveralls; coveralls --merge=.karma_coverage/lcov.json; fi" diff --git a/karma.conf.js b/karma.conf.js index 11ab2534..57f7fa34 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -74,7 +74,6 @@ module.exports = function (config) { dir: '.karma_coverage/', reporters: [ { type: 'lcov', subdir: '.' }, - { type: 'json', subdir: '.' }, { type: 'text' } ] } diff --git a/tox.ini b/tox.ini index 73fd03c1..22ff53ec 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,7 @@ envlist = py27, flake8, test, eslint, csslint, tidy [testenv] +passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH sitepackages = true whitelist_externals = py.test @@ -31,7 +32,6 @@ skip_install = true commands = flake8 --show-source --statistics --max-line-length 120 {posargs:mopidy_musicbox_webclient tests} [testenv:test] -envdir = py27 sitepackages = false whitelist_externals = /bin/bash