Closed krzentner closed 5 years ago
Why remove the coverage?
pytest-cov doesn't seem to be working on python 3.5, and I would like the CI to work. Are we doing something different for garage? Alternatively, is there an easy way to fix the coverage or only check it for python 3.6?
garage is organized as an application with a single canonical Python version (specified in environment.yml), so we don't have a Python version testing matrix for it.
akro is library, so we test it on a matrix of Python version >= 3.5. Right now that's 3.5 and 3.6, since 3.7 is a bit bleeding edge for some libraries. It's also significantly easier to set this up for akro than garage.
You're right that we only need really coverage data for a single run in the testing matrix.
In this case, Travis induces a testing matrix from the stanza:
python:
- "3.5"
- "3.6"
You can access which element of the matrix you're in using environment variables. So I think in this case the best quick fix is to see if we're in Python 3.5 and run non-coverage testing.
script:
# ...
- |
if [[ "${TRAVIS_PYTHON_VERSION}" == "3.5" ]]; then
pytest
else
pytest --cov=akro
fi
# ...
after_script:
- |
if [[ "${TRAVIS_PYTHON_VERSION}" != "3.5" ]]; then
coverage xml
bash <(curl -s https://codecov.io/bash)
coveralls
fi
#...
ah i think this fix might not work because pytest is trying to load all installed plugins before execution, rather than just choosing what you use. i will do some spelunking.
FTFY
I suggest you rebase-merge
Codecov Report
100% <100%> (ø)
Continue to review full report at Codecov.