mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 08:14:16 +03:00
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:
parent
41ac3565de
commit
50c2d71a80
49
.travis.yml
49
.travis.yml
|
@ -1,46 +1,47 @@
|
||||||
language: python
|
language: python
|
||||||
|
|
||||||
python:
|
python:
|
||||||
|
- "2.7"
|
||||||
|
- "3.3"
|
||||||
|
- "3.4"
|
||||||
- "3.5"
|
- "3.5"
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- TOX_ENV=py27-lint
|
- DJANGO=1.8
|
||||||
- TOX_ENV=py27-docs
|
- DJANGO=1.9
|
||||||
- TOX_ENV=py35-django19
|
- DJANGO=1.10
|
||||||
- TOX_ENV=py34-django19
|
- DJANGO=master
|
||||||
- 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
|
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
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:
|
allow_failures:
|
||||||
- env: TOX_ENV=py27-djangomaster
|
- env: DJANGO=master
|
||||||
- env: TOX_ENV=py34-djangomaster
|
|
||||||
- env: TOX_ENV=py35-djangomaster
|
|
||||||
- env: TOX_ENV=py36-djangomaster
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Virtualenv < 14 is required to keep the Python 3.2 builds running.
|
- pip install tox tox-travis
|
||||||
- pip install tox virtualenv
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- tox -e $TOX_ENV
|
- tox
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- pip install codecov
|
- pip install codecov
|
||||||
- codecov -e TOX_ENV
|
- codecov -e TOXENV,DJANGO
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
"""
|
r"""
|
||||||
______ _____ _____ _____ __
|
______ _____ _____ _____ __
|
||||||
| ___ \ ___/ ___|_ _| / _| | |
|
| ___ \ ___/ ___|_ _| / _| | |
|
||||||
| |_/ / |__ \ `--. | | | |_ _ __ __ _ _ __ ___ _____ _____ _ __| |__
|
| |_/ / |__ \ `--. | | | |_ _ __ __ _ _ __ ___ _____ _____ _ __| |__
|
||||||
|
|
32
tox.ini
32
tox.ini
|
@ -3,11 +3,17 @@ addopts=--tb=short
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
py27-{lint,docs},
|
|
||||||
{py27,py33,py34,py35}-django18,
|
{py27,py33,py34,py35}-django18,
|
||||||
{py27,py34,py35}-django19,
|
{py27,py34,py35}-django{19,110},
|
||||||
{py27,py34,py35}-django110,
|
{py27,py34,py35,py36}-djangomaster,
|
||||||
{py27,py34,py35,py36}-django{master}
|
lint,docs
|
||||||
|
|
||||||
|
[travis:env]
|
||||||
|
DJANGO =
|
||||||
|
1.8: django18
|
||||||
|
1.9: django19
|
||||||
|
1.10: django110
|
||||||
|
master: djangomaster
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands = ./runtests.py --fast {posargs} --coverage -rw
|
commands = ./runtests.py --fast {posargs} --coverage -rw
|
||||||
|
@ -15,26 +21,22 @@ setenv =
|
||||||
PYTHONDONTWRITEBYTECODE=1
|
PYTHONDONTWRITEBYTECODE=1
|
||||||
PYTHONWARNINGS=once
|
PYTHONWARNINGS=once
|
||||||
deps =
|
deps =
|
||||||
django18: Django==1.8.17
|
django18: Django>=1.8,<1.9
|
||||||
django19: Django==1.9.12
|
django19: Django>=1.9,<.1.10
|
||||||
django110: Django==1.10.5
|
django110: Django>=1.10,<1.11
|
||||||
djangomaster: https://github.com/django/django/archive/master.tar.gz
|
djangomaster: https://github.com/django/django/archive/master.tar.gz
|
||||||
-rrequirements/requirements-testing.txt
|
-rrequirements/requirements-testing.txt
|
||||||
-rrequirements/requirements-optionals.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
|
commands = ./runtests.py --lintonly
|
||||||
deps =
|
deps =
|
||||||
-rrequirements/requirements-codestyle.txt
|
-rrequirements/requirements-codestyle.txt
|
||||||
-rrequirements/requirements-testing.txt
|
-rrequirements/requirements-testing.txt
|
||||||
|
|
||||||
[testenv:py27-docs]
|
[testenv:docs]
|
||||||
|
basepython = python2.7
|
||||||
commands = mkdocs build
|
commands = mkdocs build
|
||||||
deps =
|
deps =
|
||||||
-rrequirements/requirements-testing.txt
|
-rrequirements/requirements-testing.txt
|
||||||
|
|
Loading…
Reference in New Issue
Block a user