forked from AmbitionEng/django-pgtrigger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
36 lines (34 loc) · 1.26 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
[tox]
isolated_build = true
envlist = py{38,39,310,311,312}-django{32,42}-psycopg2,py312-django42-psycopg3,report
[testenv]
install_command = pip install {opts} --no-compile {packages}
deps =
django32: Django>=3.2,<3.3
django42: Django>=4.2,<4.3
psycopg2: psycopg2-binary
psycopg3: psycopg[binary]
allowlist_externals =
poetry
bash
grep
passenv =
DATABASE_URL
PYTHONDONTWRITEBYTECODE
skip_install = true
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 pgtrigger/
# 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 pgtrigger/
[testenv:report]
allowlist_externals =
coverage
skip_install = true
depends = py{38,39,310,311,312}-django{32,42}-psycopg2,py312-django42-psycopg3
parallel_show_output = true
commands =
coverage report --fail-under 100
coverage erase