-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
56 lines (50 loc) · 1.37 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
[tox]
; Minimum version of Tox
minversion = 1.8
envlist =
ruff
py39-django{41,42}
py310-django{41,42,50}
py311-django{41,42,50}
py312-django{42,50}
[gh-actions]
; Maps GitHub Actions python version numbers to tox env vars:
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[gh-actions:env]
; Maps GitHub Actions DJANGO version env var to tox env vars:
DJANGO =
4.1: django41
4.2: django42
5.0: django50
main: djangomain
; Dependencies and ENV things we need for all environments:
[base]
; Load dependencies from setup.py's extras_require["test"]:
extras = test
setenv =
DJANGO_SETTINGS_MODULE=tests.settings
PYTHONPATH={toxinidir}
[testenv]
deps =
django41: Django >= 4.1, < 4.2
django42: Django >= 4.2, < 4.3
django50: Django >= 5.0, < 5.1
djangomain: https://github.com/django/django/archive/master.tar.gz
extras =
{[base]extras}
setenv =
{[base]setenv}
commands =
; posargs will be replaced with anything after the -- when calling tox, eg;
; tox -- tests.ditto.tests.test_views.DittoViewTests.test_home_templates
; would run that single test (in all environments)
coverage run --branch --source=ditto --omit=*/migrations/*.py {envbindir}/django-admin test {posargs:}
coverage report -m
[testenv:ruff]
skip_install = true
deps = ruff
commands = ruff check {posargs:--output-format=full .}