-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
55 lines (43 loc) · 1.11 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]
envlist = d{42,51}
envtmpdir={toxinidir}/build/{envname}/tmp
envlogdir={toxinidir}/build/{envname}/log
[testenv]
basepython=python3.11
skip_install = true
passenv =
PYTHONDONTWRITEBYTECODE
USER
PYTHONPATH
DATABASE_URL
DATABASE_HOPE_URL
deps =
uv
setenv =
PYTHONDONTWRITEBYTECODE=true
PYTHONPATH={toxinidir}/src
d42: DJANGO = django>=4,<5
d51: DJANGO = django>=5,<6
d42: LOCK = "uv4.lock"
d51: LOCK = "uv5.lock"
commands =
uv export -q --no-hashes -o {work_dir}/requirements.txt
pip install -r {work_dir}/requirements.txt
pip install '{env:DJANGO}'
pytest
[testenv:report]
commands =
pip install coverage
coverage html
[testenv:package]
skip_install = true
deps=
build
twine
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 hope-flex-fields --use-pep517 --no-deps --no-cache-dir --find-links file://{toxinidir}/dist/