-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
61 lines (50 loc) · 1.76 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]
envlist =
python{3.8,3.9,3.10}-django{3.2,4.1,4.2}
python{3.10,3.11,3.12}-django{4.1,4.2,5.0}
[gh-actions]
python =
3.8: python3.8
3.9: python3.9
3.10: python3.10
3.11: python3.11
3.12: python3.12
[testenv]
package = editable
extras = testing
commands_pre =
# Mostly to check that the requirements are in order
python -m pip freeze
commands =
# Run coverage in append mode so that we get a combined report over all environments.
# This can not be combined with parallel mode.
# This only affects local working, because each env is run on a different runner in CI.
# In CI, Codecov will combine the reports.
coverage run -a testmanage.py test --deprecation all {posargs: -v 2}
commands_post =
# The report is converted to json to be uploaded to codecov.
coverage json --data-file .coverage -o .coverage.json
basepython =
python3.8: python3.8
python3.9: python3.9
python3.10: python3.10
python3.11: python3.11
python3.12: python3.12
deps =
django3.2: Django>=3.2,<4.0
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2
django4.2: Django>=4.2,<4.3
django5.0: Django>=5.0,<5.1
djangomain: git+https://github.com/django/django.git@main#egg=Django
[testenv:interactive]
basepython = python3.11
commands_pre =
python {toxinidir}/testmanage.py makemigrations
python {toxinidir}/testmanage.py migrate
python {toxinidir}/testmanage.py shell -c "from django.contrib.auth.models import User;(not User.objects.filter(username='admin').exists()) and User.objects.create_superuser('admin', '[email protected]', 'changeme')"
python {toxinidir}/testmanage.py createcachetable
commands =
{posargs:python testmanage.py runserver 0.0.0.0:8020}
setenv =
INTERACTIVE = 1