Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
travis-ci: simplify test setup with tox and coverage uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
radhermit committed Aug 8, 2015
1 parent a586643 commit 1e80c24
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
24 changes: 15 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
language: python
python:
- 2.7
- 3.3
- 3.4
- 2.7
- 3.3
- 3.4
- nightly
matrix:
fast_finish: true
allow_failures:
- python: nightly
sudo: false
install: pip install 'tox<2' 'coveralls>0.5'
script: tox -e py${TRAVIS_PYTHON_VERSION/\./}
cache:
directories:
- $HOME/.cache/pip
install: pip install 'tox<2' 'coveralls>=0.5'
script: tox -e travis
after_success:
# upload coverage data to coveralls.io
- pushd .tox/py${TRAVIS_PYTHON_VERSION/\./}/lib/python*/site-packages
- coveralls
- popd
# upload coverage data
- coveralls
10 changes: 9 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,12 @@ deps =
commands =
pip install "{toxinidir}"
cp "{toxinidir}/.coveragerc" "{envsitepackagesdir}"
py.test {posargs:-n 4 --cov pychroot "{toxinidir}/test"}
py.test {posargs:-n 4 --cov-report html --cov pychroot "{toxinidir}/test"}

# stub for travis-ci
[testenv:travis]
commands =
pip install "{toxinidir}"
cp "{toxinidir}/.coveragerc" "{envsitepackagesdir}"
py.test {posargs:-n 4 --cov-report xml --cov pychroot "{toxinidir}/test"}
cp coverage.xml "{toxinidir}"

0 comments on commit 1e80c24

Please sign in to comment.