-
-
Notifications
You must be signed in to change notification settings - Fork 480
/
tox.ini
65 lines (57 loc) · 1.68 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
[tox]
envlist =
py{38,39,310,311,312}-dj42-{sqlite3,postgres,mysql,mariadb},
py{310,311,312}-dj50-{sqlite3,postgres,mysql,mariadb},
py{310,311,312}-djmain-{sqlite3,postgres,mysql,mariadb},
# DEV: Add `313` to the Python versions above (so that postgres is tested with 3.13)
# when `psycopg` provides binaries for 3.13
py313-dj{42,50,main}-{sqlite3,mysql,mariadb},
docs,
lint
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311, docs, lint
3.12: py312
3.13: py313
[gh-actions:env]
DJANGO =
4.2: dj42
5.0: dj50
main: djmain
[flake8]
ignore = N802,F401,W503
max-complexity = 10
max-line-length = 88
exclude = __init__.py,simple_history/registry_tests/migration_test_app/migrations/*
[testenv]
deps =
-rrequirements/test.txt
dj42: Django>=4.2,<4.3
dj50: Django>=5.0,<5.1
djmain: https://github.com/django/django/tarball/main
postgres: -rrequirements/postgres.txt
mysql: -rrequirements/mysql.txt
mariadb: -rrequirements/mysql.txt
commands =
sqlite3: coverage run -a runtests.py {posargs}
postgres: coverage run -a runtests.py --database=postgres {posargs}
mysql: coverage run -a runtests.py --database=mysql {posargs}
mariadb: coverage run -a runtests.py --database=mariadb {posargs}
coverage report
[testenv:format]
deps = -rrequirements/lint.txt
commands =
isort docs simple_history runtests.py
black docs simple_history runtests.py
flake8 simple_history
[testenv:lint]
deps = pre-commit
commands =
pre-commit run --all-files
[testenv:docs]
changedir = docs
deps = -rrequirements/docs.txt
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html