File: tox.ini

package info (click to toggle)
python-django-pgtrigger 4.15.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 956 kB
  • sloc: python: 4,412; makefile: 114; sh: 8; sql: 2
file content (47 lines) | stat: -rw-r--r-- 1,756 bytes parent folder | download | duplicates (3)
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
[tox]
isolated_build = true
envlist =
    py{39,310,311,312,313}-django42-psycopg2
    py313-django42-psycopg3
    py{310,311,312,313}-django50-psycopg2
    py313-django50-psycopg3
    py{310,311,312,313}-django51-psycopg2
    py313-django51-psycopg3
    py{310,311,312,313}-django52-psycopg2
    py313-django52-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
    django52: Django>=5.2,<5.3
    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{39,310,311,312,313}-django42-psycopg2, py313-django42-psycopg3, py{310,311,312,313}-django50-psycopg2, py313-django50-psycopg3, py{310,311,312,313}-django51-psycopg2, py313-django51-psycopg3, py{310,311,312,313}-django52-psycopg2, py313-django52-psycopg3
parallel_show_output = true
commands =
    coverage report --fail-under 100
    coverage erase