File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff 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]
5957deps =
6058 -r requirements.txt
You can’t perform that action at this time.
0 commit comments