Skip to content

Commit

Permalink
travis set up for testing multiple packages with common coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tgbugs committed Mar 28, 2019
1 parent 865aba2 commit 4e0cd39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[run]
omit = */neurons/compiled/*
omit = */neurondm/compiled/*
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4e0cd39

Please sign in to comment.