File: tox.ini

package info (click to toggle)
python-django-pint 0.7.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 432 kB
  • sloc: python: 1,531; makefile: 28; sh: 12
file content (60 lines) | stat: -rw-r--r-- 1,586 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
[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 =
       {py38,py39,py310,py311}-django32
       {py38,py39,py310,py311}-django42


[gh-actions]
python =
    3.8: py38
    3.9: py39
    3.10: py310
    3.11: py311

[docker:postgres]
image = postgres:12-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 =
    django32: Django>=3.2,<3.3
    django42: Django>=4.2,<4.3
    psycopg2-binary
    pytest
    pytest-cov
    pytest-django
docker=
    postgres

commands =
    pytest -vv {posargs}