diff --git a/.travis.yml b/.travis.yml index c5fbb9b23d..556118eea4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ branches: env: global: - CACHE_NAME=JOB1 + # NOTE: We only enable coverage for master builds and not pull requests + # since it has huge performance overhead (etests are 50% or so slower) - ENABLE_COVERAGE=$([ "${TRAVIS_PULL_REQUEST}" = "false" ] && echo "yes" || echo "no") matrix: include: @@ -64,14 +66,16 @@ before_install: - sudo pip install --upgrade "virtualenv==15.1.0" install: - - "echo ${ENABLE_COVERAGE}" - if [ "${TASK}" = 'compilepy3 ci-py3-unit' ] || [ "${TASK}" = 'ci-py3-integration' ]; then pip install "tox==3.0.0"; else make requirements; fi - - if [ "${TASK}" = 'ci-unit' ] || [ "${TASK}" = 'ci-integration' ] && [ "${ENABLE_COVERAGE}" = 'yes' ]; then pip install codecov; fi + # NOTE: We need eventlet installed so coverage can be correctly combined. This is needed because we are covering code which utilizes eventlet. + # Without eventlet being available to the coverage command it will fail with "Couldn't trace with concurrency=eventlet, the module isn't installed." + - if [ "${TASK}" = 'ci-unit' ] || [ "${TASK}" = 'ci-integration' ] && [ "${ENABLE_COVERAGE}" = 'yes' ]; then pip install eventlet ; pip install -e "git+https://github.com/Kami/codecov-python.git@better_error_output#egg=codecov"; fi - if [ "${TASK}" = 'ci-unit' ] || [ "${TASK}" = 'ci-integration' ] || [ "${TASK}" = 'compilepy3 ci-py3-unit' ] || [ "${TASK}" = 'ci-py3-integration' ]; then sudo .circle/add-itest-user.sh; fi # Let's enable rabbitmqadmin # See https://github.com/messagebus/lapine/wiki/Testing-on-Travis. before_script: + - "echo ENABLE_COVERAGE=${ENABLE_COVERAGE}" - git --version - pip --version - virtualenv --version