From 1b886c0191852e0a7b96d3c9aba17df17fbea46f Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Fri, 20 Apr 2018 13:35:15 +0200 Subject: [PATCH] Create coverage only for two sample builds. `tox.ini` also only runs coverage for one Python version. --- .travis.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6259a4a..424dc05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,11 +13,14 @@ matrix: python: 3.5 - os: linux python: 3.6 - - os: linux - python: 3.7-dev + env: WITH_COVERAGE=1 - os: linux python: 3.6 - env: PURE_PYTHON=1 + env: + - PURE_PYTHON=1 + - WITH_COVERAGE=1 + - os: linux + python: 3.7-dev - os: linux python: pypy - os: linux @@ -64,14 +67,14 @@ install: # (https://travis-ci.org/zopefoundation/BTrees/jobs/192340692) so # we install with pip manually. - pip install -U persistent - - pip install coveralls coverage + - if [[ "$WITH_COVERAGE" == "1" ]]; then pip install coveralls coverage; fi - pip install -e .[test,ZODB] script: - - coverage run -m zope.testrunner --test-path=. --auto-color --auto-progress + - if [[ "$WITH_COVERAGE" == "1" ]]; coverage run -m zope.testrunner --test-path=. --auto-color --auto-progress --verbose; else zope-testrunner --test-path=. --auto-color --auto-progress; fi notifications: email: false after_success: - - coveralls + - if [[ "$WITH_COVERAGE" == "1" ]]; coveralls; fi - echo [distutils] > ~/.pypirc - echo index-servers = pypi >> ~/.pypirc - echo [pypi] >> ~/.pypirc