-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
66 lines (60 loc) · 1.55 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
[tox]
# Django 4.2 supports Python 3.8 and later. Target 3.10 for deployment (Ubuntu 22.04).
envlist =
{py38,py39,py310,py311,py312}-django42
; {py310,py311,py312}-django{50,51}
py310-checks
skipsdist = true
skip_missing_interpreters = true
[testenv]
setenv =
IGNORE_ENV_FILE=true
SECRET_KEY="For testing only!"
commands =
python manage.py collectstatic --noinput
python -Wa manage.py test {posargs}
deps =
-r requirements.txt
; django42: Django>=4.2,<4.3
; django50: Django>=5.0,<5.1
; django51: Django>=5.1,<5.2
[testenv:py310-checks]
basepython=python3.10
commands =
; Check model consistency and other bugs
python manage.py check
; Check templates for syntax errors
python manage.py validate_templates --ignore-app genericsite
; Check whether you forgot to run makemigrations after changing models
python manage.py makemigrations --no-input --dry-run --check
deps =
-r requirements.txt
[testenv:py310-coverage]
basepython=python3.10
commands =
coverage run --source='.' manage.py test {posargs}
deps =
-r requirements.txt
coverage
[coverage:run]
# Measure branch coverage as well as statement coverage
branch = true
# Ignore migrations and test files, inflates the coverage %
# NOTE: Paths are relative to the manage.py dir
omit =
*/asgi.py
*/celery.py
*/settings.py
*/wsgi.py
**/migrations/*
[pycodestyle]
exclude = migrations
ignore = E203, E501, W503
max-line-length = 88
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312