73 lines
1.6 KiB
YAML
73 lines
1.6 KiB
YAML
dist: xenial
|
|
os:
|
|
- linux
|
|
# - osx
|
|
sudo: required
|
|
language: python
|
|
python:
|
|
- "3.7"
|
|
- "3.6"
|
|
- "3.5"
|
|
- "3.4"
|
|
- "2.7"
|
|
- "pypy"
|
|
- "pypy3"
|
|
matrix:
|
|
include:
|
|
# add a pep8 test
|
|
- python: 3.6
|
|
env: TOXENV=pep8
|
|
|
|
# test setup.py using each tested version
|
|
- python: 3.7
|
|
env: TOXENV=setup37
|
|
|
|
- python: 3.6
|
|
env: TOXENV=setup36
|
|
|
|
- python: 3.5
|
|
env: TOXENV=setup35
|
|
|
|
- python: 3.4
|
|
env: TOXENV=setup34
|
|
|
|
- python: 2.7
|
|
env: TOXENV=setup27
|
|
|
|
# do some tests with LC_ALL=C to check for locale variance
|
|
- python: 3.6
|
|
env: LC_ALL=C
|
|
|
|
- python: 2.7
|
|
env: LC_ALL=C
|
|
|
|
allow_failures:
|
|
# pep8 failures shouldn't be considered fatal
|
|
- env: TOXENV=pep8
|
|
# pypy and pypy3 tests are just for fun
|
|
- python: "pypy"
|
|
- python: "pypy3"
|
|
# osx, until it's working
|
|
# - os: osx
|
|
|
|
# install requirements
|
|
install:
|
|
- sed -i -e 's/^/#/' tests/gnupghome/gpg-agent.conf
|
|
- ./install_dependencies.${TRAVIS_OS_NAME}.sh
|
|
# ensure tox and coveralls are installed. pin PyYAML until we drop Python 3.4
|
|
- pip install tox python-coveralls PyYAML==5.2
|
|
|
|
# set TOXENV if it isn't yet
|
|
before_script:
|
|
- if [[ -z "$TOXENV" ]]; then export TOXENV=py${TRAVIS_PYTHON_VERSION//.}; fi
|
|
- if [[ "${TRAVIS_PYTHON_VERSION}" == 'pypy' ]]; then export TOXENV=pypy; fi
|
|
- if [[ "${TRAVIS_PYTHON_VERSION}" == 'pypy3' ]]; then export TOXENV=pypy3; fi
|
|
|
|
# run tox
|
|
script:
|
|
- ./tox.sh
|
|
|
|
# and report coverage to coveralls, but only if this was a pytest run
|
|
after_success:
|
|
- if [[ "${TOXENV}" == "py"* ]]; then coveralls; fi
|