From 4e0cd3945f795de6100ddb9fde6d6235d85df97e Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Wed, 27 Mar 2019 20:27:21 -0400 Subject: [PATCH] travis set up for testing multiple packages with common coverage --- .coveragerc | 2 +- .travis.yml | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.coveragerc b/.coveragerc index 209c5346..0b6f6476 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,2 +1,2 @@ [run] -omit = */neurons/compiled/* +omit = */neurondm/compiled/* diff --git a/.travis.yml b/.travis.yml index 80eddf5c..1bf8ef19 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,12 +38,17 @@ before_install: install: - pip install --upgrade pytest pytest-cov - pip install coverage coveralls && export HAS_COVERALLS=1 - - for f in {htmlfn,ttlser,pyontutils,neurondm,nifstd}; do pushd $f; python setup.py develop; popd; done + - for f in {htmlfn,ttlser,pyontutils,neurondm,nifstd}; do pushd $f; python setup.py develop --user; popd; done script: - ipython -c "__import__('pyontutils.config').config.bootstrap_config()" - # TODO check to see which ones have changed and only test those ?? will that break coveralls? - - pytest --verbose --cov=ttlser --cov=pyontutils --cov=nifstd_tools --cov=htmlfn ttlser/test test nifstd/test neurondm/test + - export COVERAGE_FILE="$(pwd)/.coverage" + - pushd htmlfn; pytest --verbose --cov-append --cov-config=../.coveragerc --cov=htmlfn test && popd || export DEAD=htmlfn: ; popd + - pushd ttlser; pytest --verbose --cov-append --cov-config=../.coveragerc --cov=ttlser test && popd || export DEAD=${DEAD}ttlser: ; popd + - pytest --verbose --cov-append --cov=pyontutils test && popd || export DEAD=${DEAD}pyontutils: + - pushd nifstd; pytest --verbose --cov-append --cov-config=../.coveragerc --cov=pyontutils --cov=nifstd_tools test && popd || export DEAD=${DEAD}nifstd: ; popd + - pushd neurondm; pytest --verbose --cov-append --cov-config=../.coveragerc --cov=pyontutils --cov=neurondm test && popd || export DEAD=${DEAD}neurondm: ; popd + - $(if [ -n ${DEAD} ]; then (>&2 echo ${DEAD}); exit 1; fi) after_success: - if [[ $HAS_COVERALLS ]] ; then coveralls ; fi