-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
72 lines (68 loc) · 2.03 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
[tox]
envlist =
py{310,311,312}-django50-{sqlite,mysql,postgresql}
py{38,39,310,311}-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}
qa
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
[testenv]
usedevelop = true
commands =
mysql: mysql -u root -h {env:DB_HOST} --password={env:DB_PASSWORD} --protocol tcp -e 'drop database if exists test_dbdiff_test;'
postgresql: psql -U postgres -h {env:DB_HOST} -c 'drop database if exists test_dbdiff_test;'
pytest -vv --cov dbdiff --create-db --strict -r fEsxXw {posargs:dbdiff}
allowlist_externals =
mysql
psql
deps =
pytest
pytest-django
pytest-cov
mock
coverage
django50: Django>=5.0rc1,<5.1
django42: Django>=4.2,<5.0
django41: Django>=4.1,<4.2
django40: Django>=4.0,<4.1
django32: Django>=3.2,<4.0
postgresql: psycopg2-binary==2.9.9
mysql: mysqlclient
setenv =
PIP_ALLOW_EXTERNAL=true
DJANGO_SETTINGS_MODULE=dbdiff.tests.project.settings
sqlite: DJANGO_SETTINGS_MODULE=dbdiff.tests.project.settings_sqlite
postgresql: DJANGO_SETTINGS_MODULE=dbdiff.tests.project.settings_postgresql
postgresql: DB_NAME=dbdiff_test
postgresql: DB_ENGINE=postgresql_psycopg2
postgresql: DB_USER=postgres
mysql: DJANGO_SETTINGS_MODULE=dbdiff.tests.project.settings_mysql
mysql: DB_NAME=dbdiff_test
mysql: DB_ENGINE=mysql
mysql: DB_USER=root
passenv =
TEST_*
DBDIFF_*
DB_*
PGPASSWORD
[testenv:qa]
basepython = python3.8
commands =
flake8 --show-source --exclude tests --max-complexity=7 --ignore=D203 dbdiff
flake8 --show-source --exclude migrations --max-complexity=3 --ignore=D100,D101,D102,D103 dbdiff/tests
deps =
flake8
mccabe
flake8-debugger
flake8-import-order
flake8-docstrings
pep8-naming