Skip to content

Commit 8d25304

Browse files
committed
change test framework
1 parent e1b9fc8 commit 8d25304

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@ matrix:
1010
env: TOX_ENV=py27-lint-readme
1111
- python: 3.5
1212
env: TOX_ENV=py35-pytest
13+
install:
14+
- pip install tox
15+
- pip install codacy-coverage
1316
services:
1417
- docker
18+
script:
19+
- tox -e $TOX_ENV
20+
# Only run if CODACY_PROJECT_TOKEN is defined.
21+
# This is not the case for pull requests outside of galaxyproject/ephemeris
22+
- bash -c 'if [[ -v CODACY_PROJECT_TOKEN ]] ; then python-codacy-coverage -r coverage.xml; fi'
23+
1524
- python: 2.7
1625
env: TOX_ENV=py27-pytest
1726
services:

tox.ini

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ commands =
5050
pytest -v --cov={envsitepackagesdir}/ephemeris --cov-report xml {[tox]test_dir}
5151
# Replace the installed package directory by the source directory.
5252
# This is needed for codacy to understand which files have coverage testing
53+
# Unfortunately this has to run in the tox env to have access to envsitepackagesdir
5354
sed -i 's#{envsitepackagesdir}#src#' coverage.xml
54-
# If running on travis, send a coverage report to codacy.
55-
# The CODACY_PROJECT_TOKEN env variable should be defined on travis.
56-
# This is only the case when the pull request is run from the ephemeris repo. So this is checked.
57-
bash -c 'if [ "$TRAVIS" = "true" ] && [ "$TRAVIS_REPO_SLUG" = "galaxyproject/ephemeris" ] ; then python-codacy-coverage -r coverage.xml; fi'
55+
5856
[testenv:py27]
5957
deps =
6058
-r requirements.txt

0 commit comments

Comments
 (0)