From ad0af328f3a4b639d4e8143037117e256ad61645 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 11 Sep 2018 23:23:59 -0400 Subject: [PATCH 1/6] ENH: run tests with coverage --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 816ae52..2605b08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,12 @@ before_install: # command to install dependencies install: - pip install -r requirements.txt + - pip install -q codecov + # command to run tests -script: make test PYTESTOPTS=-s +script: + - make localbuild + - coverage run -- `which pytest` -s -v tests/ + #notifications: # email: false From 5d2638be3d5426a0cfb4af519a13d48068563b87 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 11 Sep 2018 23:35:42 -0400 Subject: [PATCH 2/6] ENH: test python 3.6 as well --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 2605b08..176bc45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ python: - "3.3" - "3.4" - "3.5" + - "3.6" # whitelist branches: only: From 868ca90092801bb7296c24a33d492e04cbc609ea Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 11 Sep 2018 23:43:56 -0400 Subject: [PATCH 3/6] BF: on python 3.3 coverage/pytest are not cooperating - no coverage there --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 176bc45..f175479 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,8 @@ install: # command to run tests script: - make localbuild - - coverage run -- `which pytest` -s -v tests/ + - if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then COVERAGE=; else COVERAGE="coverage run"; fi + - $COVERAGE `which pytest` -s -v tests/ #notifications: # email: false From 1bfcb113648cd09fec370ba520d8bac132fa9e86 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 12 Sep 2018 10:17:45 -0400 Subject: [PATCH 4/6] BF: no pytest helper on 3.3 as well --- .travis.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f175479..83bba90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,8 +36,14 @@ install: # command to run tests script: - make localbuild - - if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then COVERAGE=; else COVERAGE="coverage run"; fi - - $COVERAGE `which pytest` -s -v tests/ + - if [ $TRAVIS_PYTHON_VERSION = 3.3 ]; then + COVERAGE= ; + PYTEST="python -m pytest"; + else + COVERAGE="coverage run" ; + PYTEST=`which pytest`; + fi + - $COVERAGE $PYTEST -s -v tests/ #notifications: # email: false From 74a4b184e9aaa3a1b950d7ec89001ed17c13de4d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 12 Sep 2018 10:39:01 -0400 Subject: [PATCH 5/6] ENH(TST): remove -s from pytest run on travis -- floods too much --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 83bba90..99366f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ script: COVERAGE="coverage run" ; PYTEST=`which pytest`; fi - - $COVERAGE $PYTEST -s -v tests/ + - $COVERAGE $PYTEST -v tests/ #notifications: # email: false From 2c2177464cb953553727235918d6261bfffef474 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 12 Sep 2018 10:13:45 -0400 Subject: [PATCH 6/6] ENH: actually submit coverage report to codecov --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 99366f5..caa1dd6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,5 +45,8 @@ script: fi - $COVERAGE $PYTEST -v tests/ +after_success: + - if [ ! -z "$COVERAGE" ]; then codecov; fi + #notifications: # email: false