70 lines
1.5 KiB
INI
70 lines
1.5 KiB
INI
[tox]
|
|
envlist =
|
|
py27-drf37,
|
|
py{34,35,36,37}-drf37,
|
|
py36-drfmaster,
|
|
flake8, docs
|
|
|
|
[travis:env]
|
|
DRF =
|
|
3.7: drf37
|
|
master: drfmaster
|
|
|
|
[testenv]
|
|
deps =
|
|
drf37: djangorestframework>=3.7.3,<3.8
|
|
|
|
# py27 is tested with Django <2.0 (Django 2.0 no longer supports python 2)
|
|
py27: Django>=1.11,<2.0
|
|
|
|
# main testing configurations
|
|
py{34,35,36,37}-drf37: Django>=1.11,<2.1
|
|
|
|
# py3 with the latest build of Django and django-rest-framework to get early warning of compatibility issues
|
|
drfmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
|
|
drfmaster: https://github.com/django/django/archive/master.tar.gz
|
|
|
|
# other dependencies
|
|
-rrequirements/base.txt
|
|
-rrequirements/validation.txt
|
|
-rrequirements/test.txt
|
|
|
|
commands =
|
|
pytest --cov-config .coveragerc --cov-append --cov {posargs}
|
|
|
|
[testenv:py36-drfmaster]
|
|
pip_pre = True
|
|
|
|
[testenv:flake8]
|
|
skip_install = true
|
|
deps =
|
|
flake8
|
|
flake8-isort
|
|
commands =
|
|
flake8 src/drf_yasg testproj tests setup.py
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-rrequirements/docs.txt
|
|
commands =
|
|
python setup.py check --restructuredtext --metadata --strict
|
|
sphinx-build -WnEa -b html docs docs\_build\html
|
|
|
|
[pytest]
|
|
DJANGO_SETTINGS_MODULE = testproj.settings
|
|
python_paths = testproj
|
|
|
|
[flake8]
|
|
max-line-length = 120
|
|
exclude = **/migrations/*
|
|
|
|
[isort]
|
|
skip = .eggs,.tox,docs
|
|
skip_glob = **/migrations/*
|
|
atomic = true
|
|
multi_line_output = 5
|
|
line_length = 120
|
|
known_standard_library = types
|
|
known_third_party = pytest,_pytest,django,rest_framework
|
|
known_first_party = drf_yasg
|