-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
57 lines (51 loc) · 1.14 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
45
46
47
48
49
50
51
52
53
54
55
56
57
[tox]
envlist = py3,mypy
requires =
poetry
tox-docker
[pytest]
minversion=2.0
python_functions=test should
python_files=test_* functest_*
addopts=
--cov=.
--cov-config=.coveragerc
--cov-report=term-missing
[testenv]
allowlist_externals = poetry
skip_install = true
no_package = true
commands_pre =
poetry install --only=main --extras=test
[testenv:mypy]
deps =
mypy
commands_pre =
commands =
mypy -p resultsdb --install-types --non-interactive --ignore-missing-imports
[testenv:py3-nodocker]
commands =
poetry run python -m pytest {posargs}
setenv =
NO_CAN_HAS_POSTGRES = 1
[testenv:py3]
docker = resultsdb-postgres
commands =
poetry run python -m pytest {posargs}
passenv =
DOCKER_HOST
NO_CAN_HAS_POSTGRES
RESULTSDB_POSTGRES_PORT
[docker:resultsdb-postgres]
image = docker.io/library/postgres:14.7-alpine
environment =
POSTGRES_USER=resultsdb
POSTGRES_DB=resultsdb
POSTGRES_PASSWORD=resultsdb
expose =
RESULTSDB_POSTGRES_PORT=5432/tcp
healthcheck_cmd = pg_isready --username postgres
healthcheck_retries = 30
healthcheck_timeout = 1
healthcheck_interval = 1
healthcheck_start_period = 1