-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
75 lines (59 loc) · 1.29 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
67
68
69
70
71
72
73
74
75
[tox]
envlist = d{42,51}-py{311,312}
skip_missing_interpreters = true
;skipsdist = true
[testenv]
skip_install = true
passenv =
PYTHONDONTWRITEBYTECODE
PGHOST
PGPORT
deps =
uv
;allowlist_externals =
; uv
; sh
changedir={toxinidir}
setenv =
d42: DJANGO = django==4.2.*
d51: DJANGO = django==5.1.*
d42: LOCK = "uv4.lock"
d51: LOCK = "uv5.lock"
extras =
dev
commands =
uv export -q --no-hashes -o {work_dir}/requirements.txt
pip install -r {work_dir}/requirements.txt
pip install '{env:DJANGO}'
pytest
[testenv:lint]
envdir={toxworkdir}/d42-py312/
skip_install = true
commands =
uv run flake8 src tests
uv run isort -c src tests
[testenv:docs]
extras =
docs
commands =
uv run mkdocs build
[testenv:package]
skip_install = true
allowlist_externals =
grep
tr
cut
sh
echo
deps=
build
twine
toml
setenv =
TWINE_USERNAME = {env:TWINE_TEST_USERNAME:__token__}
TWINE_PASSWORD = {env:TWINE_TEST_PASSWORD}
commands =
python -c "import shutil; shutil.rmtree('{toxinidir}/dist', ignore_errors=True)"
python -m build --outdir {toxinidir}/dist
pip install django-admin-extra-buttons --use-pep517 --no-deps --no-cache-dir --find-links file://{toxinidir}/dist/
python scripts/check_version.py