forked from release-engineering/resultsdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
82 lines (72 loc) · 1.73 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
[tox]
envlist = black,flake8,py39
requires = tox-docker
isolated_build = True
[flake8]
# If you want to ignore a specific source code line, use '# noqa' comment. If
# you want to ignore the whole file, add '# flake8: noqa' comment. Read more
# documentation about flake8 at:
# https://flake8.readthedocs.org/
max-line-length=99
exclude = .git,.tox,.venv,dist,*egg,conf,resultsdb/alembic
[pep8]
max-line-length=99
[pytest]
skip_install = true
minversion=2.0
python_functions=test should
python_files=test_* functest_*
addopts=--functional -p no:warnings testing/ --cov resultsdb --cov-report=term-missing
[testenv]
basepython = python3.9
[testenv:flake8]
skip_install = true
deps =
flake8
commands =
python -m flake8 {posargs}
[testenv:mypy]
skip_install = true
deps =
mypy
commands =
mypy -p resultsdb --install-types --non-interactive --ignore-missing-imports
--exclude resultsdb/alembic
[testenv:black]
skip_install = true
deps =
black
commands =
black --check --diff --line-length=99 resultsdb testing
[testenv:black-format]
skip_install = true
deps =
black
commands =
black --line-length=99 resultsdb testing
[testenv:py39]
docker = resultsdb-postgres
extras =
test
commands = python -m pytest {posargs}
setenv =
PYTHONPATH = {toxinidir}
POSTGRES_5432_TCP = 15432
# needs hawkey, koji
sitepackages = False
# tests read HOME
passenv =
HOME
NO_CAN_HAS_POSTGRES
[docker:resultsdb-postgres]
image = docker.io/library/postgres:12.6
environment =
POSTGRES_USER=resultsdb
POSTGRES_DB=resultsdb
POSTGRES_PASSWORD=resultsdb
ports = 15432:5432/tcp
healthcheck_cmd = pg_isready --username postgres
healthcheck_retries = 30
healthcheck_timeout = 1
healthcheck_interval = 1
healthcheck_start_period = 1