forked from coderholic/django-cities
-
Notifications
You must be signed in to change notification settings - Fork 126
/
tox.ini
117 lines (108 loc) · 2.72 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
112
113
114
115
116
117
[tox]
envlist =
py{310,311,312}-django50-{sqlite,mysql,postgresql}
py{38,39,310,311,312}-django42-{sqlite,mysql,postgresql}
py{38,39,310,311}-django41-{sqlite,mysql,postgresql}
py{38,39,310}-django40-{sqlite,mysql,postgresql}
py{38,39,310}-django32-{sqlite,mysql,postgresql}
checkqa
pylint
docs
skip_missing_interpreters = True
sitepackages = False
[gh-actions]
python =
3.8: py38, docs, checkqa, pylint, mypy
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[base]
deps =
# recommended django version and other dependencies
django-ajax-selects==2.2.0
djangorestframework
graphene==3.3
[docs]
deps =
# sphinx
Sphinx==4.2.0
; django-dbdiff
git+https://github.com/yourlabs/django-dbdiff.git@master#egg=django-dbdiff
[test]
deps =
pytest
pytest-django
pytest-cov
coverage
pylint
pylint-django
djangorestframework
; django-dbdiff
git+https://github.com/yourlabs/django-dbdiff.git@master#egg=django-dbdiff
django-ajax-selects==2.2.0
django-autoslug==1.9.9
graphene==3.3
graphene_django==3.1.5
[testenv]
usedevelop = true
commands =
mysql: mysql -u root -h {env:DB_HOST} --password={env:DB_PASSWORD} --protocol tcp -e 'drop database if exists test_cities_light_test;'
postgresql: psql -U postgres -h {env:DB_HOST} -c 'drop database if exists test_cities_light_test;'
pytest -v --cov cities_light --create-db --strict -r fEsxXw {posargs:src}
allowlist_externals =
mysql
psql
deps =
{[test]deps}
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
postgresql: psycopg2-binary==2.9.9
mysql: mysqlclient
setenv =
PIP_ALLOW_EXTERNAL=true
PYTHONPATH=.
DJANGO_SETTINGS_MODULE=test_project.settings
CI=true
sqlite: DB_NAME=:memory:
postgresql: DB_NAME=cities_light_test
postgresql: DB_ENGINE=postgresql_psycopg2
postgresql: DB_USER=postgres
mysql: DB_NAME=cities_light_test
mysql: DB_ENGINE=mysql
mysql: DB_USER=root
passenv =
TEST_*
DBDIFF_*
DB_*
PGPASSWORD
[testenv:checkqa]
basepython = python3.8
commands = pycodestyle --ignore=E402,E124,E128,W503,W504 --exclude=tests,migrations src/cities_light
deps = pycodestyle
[testenv:pylint]
basepython = python3.8
commands = pylint -j 4 --load-plugins pylint_django src/cities_light -E
deps =
{[test]deps}
[testenv:dev]
commands =
deps =
{[base]deps}
{[docs]deps}
{[test]deps}
# all supported database backends
psycopg2-binary
mysqlclient
# ipython
ipython
[testenv:docs]
deps =
{[base]deps}
{[docs]deps}
changedir = docs
commands = make html
allowlist_externals = make