-
Notifications
You must be signed in to change notification settings - Fork 49
/
tox.ini
46 lines (41 loc) · 1.25 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
[tox]
# Only one python env because we need pyrpmmd on the system
envlist = py,docs,format,lint
# If the user is missing an interpreter, don't fail
skip_missing_interpreters = True
isolated_build = true
[testenv]
commands =
poetry run python -m pytest -vv --cov --cov-report=html --cov-report=xml --cov-report=term-missing {posargs:tests}
# When running in OpenShift you don't have a username, so expanduser
# won't work. If you are running your tests in CentOS CI, this line is
# important so the tests can pass there, otherwise tox will fail to find
# a home directory when looking for configuration files.
passenv = HOME
# Required to pickup pyrpmmd from the system
sitepackages = True
# For poetry
skip_install = true
allowlist_externals = poetry
setenv =
POETRY_VIRTUALENVS_OPTIONS_SYSTEM_SITE_PACKAGES = true
commands_pre =
poetry install --all-extras
[testenv:docs]
changedir = doc
allowlist_externals =
{[testenv]allowlist_externals}
mkdir
rm
commands=
rm -rf _build
mkdir -p _static
poetry run python -m sphinx -W -b html -d {envtmpdir}/doctrees . _build/html
[testenv:format]
commands =
poetry run python -m black --check .
[testenv:lint]
commands =
poetry run ruff check . {posargs}
[flake8]
max-line-length = 100