tox/travis maintenance (#4811)

* Use py36 on travis

* Remove basepython from tox

* Use py27 on travis

* Use version ranges for dependencies

* Use tox-travis to sync python/env factors

* Add toxenv/django env vars to codecov build vars

* Use raw string to fix py36 invalid escape sequence
This commit is contained in:
Ryan P Kilby 2017-01-16 08:51:07 -05:00 committed by Tom Christie
parent 41ac3565de
commit 50c2d71a80
3 changed files with 43 additions and 40 deletions

View File

@ -1,46 +1,47 @@
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
sudo: false
env:
- TOX_ENV=py27-lint
- TOX_ENV=py27-docs
- TOX_ENV=py35-django19
- TOX_ENV=py34-django19
- TOX_ENV=py27-django19
- TOX_ENV=py35-django18
- TOX_ENV=py34-django18
- TOX_ENV=py33-django18
- TOX_ENV=py27-django18
- TOX_ENV=py27-django110
- TOX_ENV=py35-django110
- TOX_ENV=py34-django110
- TOX_ENV=py27-djangomaster
- TOX_ENV=py34-djangomaster
- TOX_ENV=py35-djangomaster
- TOX_ENV=py36-djangomaster
- DJANGO=1.8
- DJANGO=1.9
- DJANGO=1.10
- DJANGO=master
matrix:
fast_finish: true
include:
- python: "3.6"
env: DJANGO=master
- python: "2.7"
env: TOXENV="lint"
- python: "2.7"
env: TOXENV="docs"
exclude:
- python: "3.3"
env: DJANGO=1.9
- python: "3.3"
env: DJANGO=1.10
- python: "3.3"
env: DJANGO=master
allow_failures:
- env: TOX_ENV=py27-djangomaster
- env: TOX_ENV=py34-djangomaster
- env: TOX_ENV=py35-djangomaster
- env: TOX_ENV=py36-djangomaster
- env: DJANGO=master
install:
# Virtualenv < 14 is required to keep the Python 3.2 builds running.
- pip install tox virtualenv
- pip install tox tox-travis
script:
- tox -e $TOX_ENV
- tox
after_success:
- pip install codecov
- codecov -e TOX_ENV
- codecov -e TOXENV,DJANGO
notifications:
email: false

View File

@ -1,4 +1,4 @@
"""
r"""
______ _____ _____ _____ __
| ___ \ ___/ ___|_ _| / _| | |
| |_/ / |__ \ `--. | | | |_ _ __ __ _ _ __ ___ _____ _____ _ __| |__

32
tox.ini
View File

@ -3,11 +3,17 @@ addopts=--tb=short
[tox]
envlist =
py27-{lint,docs},
{py27,py33,py34,py35}-django18,
{py27,py34,py35}-django19,
{py27,py34,py35}-django110,
{py27,py34,py35,py36}-django{master}
{py27,py34,py35}-django{19,110},
{py27,py34,py35,py36}-djangomaster,
lint,docs
[travis:env]
DJANGO =
1.8: django18
1.9: django19
1.10: django110
master: djangomaster
[testenv]
commands = ./runtests.py --fast {posargs} --coverage -rw
@ -15,26 +21,22 @@ setenv =
PYTHONDONTWRITEBYTECODE=1
PYTHONWARNINGS=once
deps =
django18: Django==1.8.17
django19: Django==1.9.12
django110: Django==1.10.5
django18: Django>=1.8,<1.9
django19: Django>=1.9,<.1.10
django110: Django>=1.10,<1.11
djangomaster: https://github.com/django/django/archive/master.tar.gz
-rrequirements/requirements-testing.txt
-rrequirements/requirements-optionals.txt
basepython =
py36: python3.6
py35: python3.5
py34: python3.4
py33: python3.3
py27: python2.7
[testenv:py27-lint]
[testenv:lint]
basepython = python2.7
commands = ./runtests.py --lintonly
deps =
-rrequirements/requirements-codestyle.txt
-rrequirements/requirements-testing.txt
[testenv:py27-docs]
[testenv:docs]
basepython = python2.7
commands = mkdocs build
deps =
-rrequirements/requirements-testing.txt