File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,9 +41,16 @@ commands = pytest {[tox]test_dir}
4141
4242[testenv:py35-pytest]
4343passenv = TRAVIS,CODACY_PROJECT_TOKEN
44+ whitelist_externals = sed
45+ bash
4446commands =
4547 pytest --cov ={envsitepackagesdir}/ephemeris --cov-report xml {[tox]test_dir}
46- bash -c ' if [ "$TRAVIS" = "true" ] ; then python-codacy-coverage -r coverage.xml; fi'
48+ # Replace the installed package directory by the source directory.
49+ # This is needed for codacy to understand which files have coverage testing
50+ sed -i ' s#{envsitepackagesdir}#src#' coverage.xml
51+ # If running on travis, send a coverage report to codacy.
52+ # The CODACY_PROJECT_TOKEN env variable should be defined on travis.
53+ bash -c ' if [ "$TRAVIS" = "true" ] ; then python-codacy-coverage -r coverage.xml; fi'
4754
4855[testenv:py27]
4956commands = bash {[tox]test_dir}/test.sh
You can’t perform that action at this time.
0 commit comments