File: tox.ini

package info (click to toggle)
python-django-pint 1.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 428 kB
  • sloc: python: 1,655; makefile: 87; sh: 6
file content (61 lines) | stat: -rw-r--r-- 1,598 bytes parent folder | download
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
56
57
58
59
60
61
[tox]
minversion = 4.0
; We don't set requires as we don't want tox-docker in our github pipeline
;requires = tox-docker>4
isolated_build = True
envlist =
        py{310,311,312,313}-django52,
        py{312,313,314}-django60,


[gh-actions]
python =
    3.10: py310
    3.11: py311
    3.12: py312
    3.13: py313
    3.14: py314

[docker:postgres]
image = postgres:14-alpine
# Environment variables are passed to the container. They are only
# available to that container, and not to the testenv, other
# containers, or as replacements in other parts of tox.ini
environment =
    POSTGRES_PASSWORD=django_pint_tox
    POSTGRES_USER=django_pint_tox
    POSTGRES_DB=django_pint
# The healthcheck ensures that tox-docker won't run tests until the
# container is up and the command finishes with exit code 0 (success)
healthcheck_cmd = PGPASSWORD=$POSTGRES_PASSWORD psql \
    --user=$POSTGRES_USER --dbname=$POSTGRES_DB \
    --host=127.0.0.1 --quiet --no-align --tuples-only \
    -1 --command="SELECT 1"
healthcheck_timeout = 1
healthcheck_retries = 30
healthcheck_interval = 1
healthcheck_start_period = 1


[testenv]
passenv =
    POSTGRES_HOST
    POSTGRES_PORT
setenv =
    DJANGO_SETTINGS_MODULE=tests.settings
    TOXINIDIR = {toxinidir}
    POSTGRES_PASSWORD={env:POSTGRES_PASSWORD:django_pint_tox}
    POSTGRES_USER={env:POSTGRES_USER:django_pint_tox}
    POSTGRES_DB={env:POSTGRES_DB:django_pint}
deps =
    django52: Django>=5.2,<5.3
    django60: Django>=6.0,<6.1
    psycopg2-binary
    pytest
    pytest-cov
    pytest-django
docker=
    postgres

commands =
    pytest -vv {posargs}