-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
50 lines (39 loc) · 971 Bytes
/
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
[tox]
envlist = d{42,51}-py{311,312}
skip_missing_interpreters = true
[testenv]
;install_command=pip install {opts} {packages}
passenv =
PYTHONDONTWRITEBYTECODE
PGHOST
PGPORT
whitelist_externals = mkdir
changedir={toxinidir}
setenv =
d42: DJANGO = "django==4.2.*"
d51: DJANGO = "django==5.1.*"
d42: LOCK = "uv4.lock"
d51: LOCK = "uv5.lock"
deps =
uv
commands =
uv add {env:DJANGO}
uv run --with {env:DJANGO} pytest tests -v -rw
[testenv:lint]
envdir={toxworkdir}/d42-py312/
skip_install = true
commands =
pip install flake8 isort
flake8 src tests
isort -c src tests
[testenv:package]
deps=
build
twine
setenv =
TWINE_USERNAME = {env:TWINE_TEST_USERNAME:__token__}
TWINE_PASSWORD = {env:TWINE_TEST_PASSWORD}
commands =
python -c "import shutil; shutil.rmtree('dist', ignore_errors=True)"
python -m build
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*