From e80dc6a4e9fcc7f38c7b55e2ce36d03d9f6e5e1f Mon Sep 17 00:00:00 2001 From: Jan Szopinski Date: Sat, 9 Mar 2019 16:25:36 +0000 Subject: [PATCH 1/5] Improve tox and Travis to allow local coverage report --- .travis.yml | 4 +++- tox.ini | 16 ++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7f11883..7d9b1a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,9 @@ language: python python: - "3.7" install: pip install tox-travis -script: tox +script: + tox + coveralls deploy: provider: pages skip-cleanup: true diff --git a/tox.ini b/tox.ini index 3db9b29..369e87d 100644 --- a/tox.ini +++ b/tox.ini @@ -16,19 +16,23 @@ setenv = PYTHONPATH = {toxinidir}{:}{envdir} [testenv:unit_tests] -description = run unit tests with nose and prepare coverage report +description = run unit tests basepython = python3.7 deps = nose rednose +commands = + nosetests --rednose --ignore-files="test_resp_wrapper.py" + +[testenv:coverage] +description = prepare coverage report +basepython = python3.7 +deps = + nose nosexcover python-coveralls -# Coveralls has out-of-the-box integration with Travis but requires env variables: -passenv = TRAVIS TRAVIS_* commands = - nosetests --rednose --ignore-files="test_resp_wrapper.py" - nosetests --ignore-files="test_resp_wrapper.py" --with-xcoverage --cover-package=repESP - coveralls + nosetests --ignore-files="test_resp_wrapper.py" --with-xcoverage --cover-package=repESP --cover-html [testenv:docs] description = invoke sphinx-build to build the HTML docs From 602f119db1235bcd0ae0e2a09753db9664ca1be8 Mon Sep 17 00:00:00 2001 From: Jan Szopinski Date: Sat, 9 Mar 2019 16:27:31 +0000 Subject: [PATCH 2/5] Fix --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 369e87d..548cc0e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,9 @@ [tox] -envlist = py37, docs, unit_tests +envlist = py37, docs, unit_tests, coverage [travis] python = - 3.7: py37, docs, unit_tests + 3.7: py37, docs, unit_tests, coverage [testenv] deps = From faa5f8599cdc8ec829191d9bc6f5b27a447bc7ba Mon Sep 17 00:00:00 2001 From: Jan Szopinski Date: Sat, 9 Mar 2019 16:29:15 +0000 Subject: [PATCH 3/5] Move coveralls dependency out of tox --- .travis.yml | 2 +- tox.ini | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d9b1a0..1216354 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ dist: xenial language: python python: - "3.7" -install: pip install tox-travis +install: pip install tox-travis python-coveralls script: tox coveralls diff --git a/tox.ini b/tox.ini index 548cc0e..88c7f63 100644 --- a/tox.ini +++ b/tox.ini @@ -30,7 +30,6 @@ basepython = python3.7 deps = nose nosexcover - python-coveralls commands = nosetests --ignore-files="test_resp_wrapper.py" --with-xcoverage --cover-package=repESP --cover-html From dee9ed68702933d97d56492504b697528f68749e Mon Sep 17 00:00:00 2001 From: Jan Szopinski Date: Sat, 9 Mar 2019 16:34:22 +0000 Subject: [PATCH 4/5] Fix --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1216354..400f039 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ python: install: pip install tox-travis python-coveralls script: tox +after_success: coveralls deploy: provider: pages From e0ee03908bb52e2678d12303c693a51de0f28a1e Mon Sep 17 00:00:00 2001 From: Jan Szopinski Date: Sat, 9 Mar 2019 16:36:37 +0000 Subject: [PATCH 5/5] Fix --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 400f039..bd46892 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,7 @@ python: - "3.7" install: pip install tox-travis python-coveralls script: - tox -after_success: - coveralls + tox && coveralls deploy: provider: pages skip-cleanup: true