-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
55 lines (49 loc) · 1.34 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
[tox]
; Minimum version of Tox
minversion = 1.8
; Should match the strategy matrix in the GitHub Action
envlist =
ruff
py39-django{42}
py310-django{42,51,main}
py311-django{42,51,main}
py312-django{42,51,main}
[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.2: django42
5.1: django51
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 =
django42: Django >= 4.2, < 4.3
django51: Django >= 5.1, < 5.2
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 {envbindir}/django-admin test {posargs:}
coverage report -m
[testenv:ruff]
skip_install = true
deps = ruff
commands = ruff check {posargs:--output-format=full .}