generated from mindvessel/django-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
61 lines (55 loc) · 1.39 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
[tox]
# Django 4.2 supports Python 3.8 and later. Target 3.10 for deployment (Ubuntu 22.04).
envlist =
{py38,py39,py310,py311}-django42
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
[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