-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
111 lines (101 loc) · 2.47 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[tox]
envlist =
django22-py{36,37,38}-drf{39,310,311}-{sqlite,pg}, django{30,31,32}-py{36,37,38}-drf311-{sqlite,pg}
spectest
flake8
isort-check
skipsdist = True
[testenv]
passenv = PGHOST PGDATABASE PGUSER PGPASSWORD PGPORT
whitelist_externals = pg_virtualenv
usedevelop = True
changedir = demo
deps =
; Django versions
django22: Django>=2.2,<2.3
django30: Django<3.1
django31: Django<3.2
django32: Django<4
; DRF versions
drf39: djangorestframework<3.10
drf310: djangorestframework<3.11
drf311: djangorestframework<3.12
; When testing with postgresql
pg: psycopg2-binary>=2.8,<2.9
; Requirements from demo project
-rdemo/requirements-demo.pip
commands =
python --version
pip list --format=columns
sqlite: python manage.py test {posargs}
pg: pg_virtualenv python manage.py test --settings=demo.settings_test_pg {posargs}
[testenv:flake8]
basepython = python3.6
usedevelop = False
skip_install = True
changedir = {toxinidir}
deps = flake8
commands =
flake8 --version
; excluding git and cache dirs, tox-related dirs (default)
flake8 --exclude=.git,__pycache__,.tox,build
[testenv:isort-check]
usedevelop = False
skip_install = True
changedir = {toxinidir}
deps = isort
whitelist_externals = cat
commands =
isort --version
cat setup.cfg
isort --check-only --diff formidable
[testenv:isort-run]
usedevelop = False
skip_install = True
changedir = {toxinidir}
deps = isort
commands =
isort --recursive formidable
[testenv:spectest]
basepython = python3.6
usedevelop = False
skip_install = True
changedir = docs
deps =
pytest
jsonschema
pyyaml
commands =
pytest -s
; Not included in the test env run with `tox`
[testenv:docs]
basepython = python3
deps =
; doc building is using the latest LTS version to date (june 2020)
Django>=2.2,<2.3
-rdocs/requirements.pip
whitelist_externals = make
changedir = docs
commands =
make clean html
; Not included in the test env run with `tox`
[testenv:swagger-statics]
deps =
-rdocs/requirements.pip
whitelist_externals = make
changedir = docs
commands =
make collectstatic
[testenv:django_graph]
basepython = python3
deps =
; doc building is using the latest LTS version to date (june 2020)
Django>=2.2,<2.3
-rdemo/requirements-demo.pip
django-extensions
pyparsing
pydot
changedir = demo
whitelist_externals = make
commands =
python manage.py graph_models formidable -o ../docs/source/_static/django_graph.png