forked from AmbitionEng/django-pgtrigger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
44 lines (42 loc) · 1.54 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
[tox]
isolated_build = true
envlist =
py{38,39,310,311,312}-django42-psycopg2
py312-django42-psycopg3
py{310,311,312}-django50-psycopg2
py312-django50-psycopg3
py{310,311,312}-django51-psycopg2
py312-django51-psycopg3
report
[testenv]
allowlist_externals =
poetry
bash
grep
skip_install = true
passenv =
DATABASE_URL
PYTHONDONTWRITEBYTECODE
install_command = pip install {opts} --no-compile {packages}
deps =
django42: Django>=4.2,<4.3
django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2
psycopg2: psycopg2-binary
psycopg3: psycopg[binary]
commands =
bash -c 'poetry export --with dev --without-hashes -f requirements.txt | grep -v "^[dD]jango==" | grep -v "^psycopg2-binary==" | pip install --no-compile -q --no-deps -r /dev/stdin'
pip install --no-compile -q --no-deps --no-build-isolation -e .
pytest --create-db --cov --cov-fail-under=0 --cov-append --cov-config pyproject.toml {posargs}
# There are some tests that must run independently of the original test suite because of making
# dynamic models
pytest --create-db --cov --cov-fail-under=0 --cov-append --cov-config pyproject.toml -m independent {posargs}
[testenv:report]
allowlist_externals =
coverage
skip_install = true
depends = py{38,39,310,311,312}-django42-psycopg2, py312-django42-psycopg3, py{310,311,312}-django50-psycopg2, py312-django50-psycopg3, py{310,311,312}-django51-psycopg2, py312-django51-psycopg3
parallel_show_output = true
commands =
coverage report --fail-under 100
coverage erase