pipreqs/.travis.yml
Jon Banafato 0a9845d87d Run Travis-CI tests inside of tox
By using tox instead of the default Travis-CI Python environments, we
ensure that we have a single entrypoint to testing both locally and in
CI. This reduces redundant code and makes it clear when test
environments don't match up on different platforms.

[tox-travis](https://tox-travis.readthedocs.io/en/stable/) is introduced
here to automatically run tox jobs under the proper Travis-CI
environments. Additionally, the coveralls step is moved to a [build
stage](https://docs.travis-ci.com/user/build-stages) to run once after
all other Travis-CI tests complete.
2017-10-24 14:08:18 -04:00

26 lines
559 B
YAML

# Config file for automatic testing at travis-ci.org
language: python
python:
- "3.6"
- "3.5"
- "3.4"
- "2.7"
- "pypy"
# Use tox to run tests on Travis-CI to keep one unified method of running tests in any environment
install:
- pip install coverage coveralls tox-travis
# Command to run tests, e.g. python setup.py test
script: tox
# Use a build stage instead of after_success to get a single coveralls report
jobs:
include:
- stage: Coveralls
script:
- coverage run --source=pipreqs setup.py test
- coveralls