| [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] | |
| basepython = python3.13 | |
| allowlist_externals = poetry | |
| skip_install = true | |
| no_package = true | |
| commands_pre = | |
| poetry install --only=main --extras=test | |
| [testenv:mypy] | |
| deps = | |
| mypy | |
| setuptools | |
| 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 | |