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
|
[tox]
envlist =
docs
py{38,39,310}-dj{32,41,42}-{sqlite,postgresql,mysql}
py{310,311,312}-dj{32,41,42,50,51}-{sqlite,postgresql,mysql}
py{312,313}-dj{51,52,main}-{sqlite,postgresql,mysql}
[testenv]
deps =
dj32: Django>=3.2,<4.0
dj41: Django>=4.1,<4.2
dj42: Django>=4.2,<5.0
dj50: Django>=5.0,<5.1
dj51: Django>=5.1,<5.2
dj52: Django>=5.2,<6.0
djmain: https://github.com/django/django/archive/main.tar.gz
postgresql: psycopg2-binary
mysql: mysqlclient
pytest
pytest-django
pytest-cov
passenv=
CI
DB_BACKEND
DB_NAME
DB_USER
DB_PASSWORD
DB_HOST
DB_PORT
GITHUB_*
SQL
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/tests
PYTHONWARNINGS = d
DJANGO_SETTINGS_MODULE = testapp.settings
DB_NAME = {env:DB_NAME:tree_queries}
DB_USER = {env:DB_USER:tree_queries}
DB_HOST = {env:DB_HOST:localhost}
DB_PASSWORD = {env:DB_PASSWORD:tree_queries}
pip_pre = True
commands =
pytest {posargs}
[testenv:py{38,39,310,311,312,313}-dj{32,41,42,50,51,52,main}-postgresql]
setenv =
{[testenv]setenv}
DB_BACKEND = postgresql
DB_PORT = {env:DB_PORT:5432}
[testenv:py{38,39,310,311,312,313}-dj{32,41,42,50,51,52,main}-mysql]
setenv =
{[testenv]setenv}
DB_BACKEND = mysql
DB_PORT = {env:DB_PORT:3306}
[testenv:py{38,39,310,311,312,313}-dj{32,41,42,50,51,52,main}-sqlite]
setenv =
{[testenv]setenv}
DB_BACKEND = sqlite3
DB_NAME = ":memory:"
[testenv:docs]
commands = make -C {toxinidir}/docs html
deps =
Sphinx
allowlist_externals = make
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
[gh-actions:env]
DB_BACKEND =
mysql: mysql
postgresql: postgresql
sqlite3: sqlite
|