1[tox]
2minversion = 1.9
3envlist =
4    black
5    flake8
6    isort
7    py{36,37,38,39}-dj{22,31,32}
8    py{38,39}-djmain
9    docs
10
11[gh-actions]
12python =
13    3.6: py36
14    3.7: py37
15    3.8: py38, black, flake8, isort
16    3.9: py39
17
18[testenv]
19deps =
20    dj22: Django>=2.2,<3.0
21    dj31: Django>=3.1,<3.2
22    dj32: Django>=3.2,<3.3
23    djmain: https://github.com/django/django/archive/main.tar.gz
24    coverage
25    djangorestframework
26commands =
27    coverage run -m django test --settings=tests.settings {posargs}
28    coverage report
29    coverage xml
30ignore_outcome =
31    djmain: True
32ignore_errors =
33    djmain: True
34
35[testenv:black]
36basepython = python3
37skip_install = true
38deps = black
39commands = black --target-version=py36 --check --diff .
40
41[testenv:flake8]
42basepython = python3
43skip_install = true
44deps = flake8
45commands = flake8
46
47[testenv:isort]
48basepython = python3
49skip_install = true
50deps = isort>=5.0.2
51commands = isort --check-only --diff .
52
53[testenv:docs]
54deps = sphinx
55commands = sphinx-build -n -W docs docs/_build
56