-
Notifications
You must be signed in to change notification settings - Fork 97
/
tox.ini
65 lines (55 loc) · 2 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
[tox]
envlist = linters, unit, docs
isolated_build = True
[shared]
pytest_cov_args = --cov --cov-report html --cov-report term --cov-report xml
[testenv]
description = Run all tests with {basepython}
usedevelop = True
# Set env var to get a working Python 3.13 environment (see https://github.com/PyO3/pyo3/pull/3821)
setenv =
UNSAFE_PYO3_SKIP_VERSION_CHECK=1
deps =
-r {toxinidir}/test/requirements.txt
commands = pytest -n auto {posargs}
[testenv:linters{,-py39,-py310,-py311,-py312,-py313}]
description = Run code linters
commands =
flake8 --version
flake8 src/ansible_builder test
yamllint --version
yamllint -s .
mypy src/ansible_builder
pylint src/ansible_builder test
[testenv:unit{,-py39,-py310,-py311,-py312,-py313}]
description = Run unit tests
commands = pytest -n auto test/unit {posargs} {[shared]pytest_cov_args}
[testenv:pulp-integration{-py39,-py310,-py311,-py312,-py313}]
# Some of these tests must run serially because of a shared resource
# (the system policy.json file).
description = Run pulp integration tests
commands =
pytest -n auto -m "not serial" test/pulp_integration {posargs} {[shared]pytest_cov_args}
pytest -n 0 -m "serial" test/pulp_integration {posargs} {[shared]pytest_cov_args}
[testenv:integration{,-py39,-py310,-py311,-py312,-py313}]
description = Run integration tests
# rootless podman reads $HOME
passenv =
HOME
KEEP_IMAGES
commands =
pytest -n auto -m "not serial" test/integration {posargs} {[shared]pytest_cov_args}
pytest -n 0 -m "serial" test/integration {posargs} {[shared]pytest_cov_args}
[testenv:docs]
description = Build documentation
deps = -r{toxinidir}/docs/requirements.txt
commands =
sphinx-build -T -E -W -n --keep-going {tty:--color} -j auto -d docs/build/doctrees -b html docs docs/build/html
[testenv:clean]
description = Erase docs and coverage artifacts
deps =
skip_install = True
allow_external = /bin/sh
commands =
/bin/sh -c "rm -rf {toxinidir}/test/coverage/*"
/bin/sh -c "rm -rf {toxinidir}/docs/{_,}build"