forked from ansible/ansible-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
70 lines (62 loc) · 1.99 KB
/
tox.ini
File metadata and controls
70 lines (62 loc) · 1.99 KB
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
[tox]
envlist =
linters
unit
integration
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
deps =
-r {toxinidir}/test/requirements.txt
commands = pytest -n auto {posargs}
[testenv:linters{,-py39,-py310,-py311,-py312,-py313,-py314}]
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,-py314}]
description = Run unit tests
setenv =
NO_COLOR=1
passenv =
NO_COLOR
commands = pytest -n auto test/unit {[shared]pytest_cov_args} {posargs}
[testenv:pulp-integration{-py39,-py310,-py311,-py312,-py313,-py314}]
# 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 {[shared]pytest_cov_args} {posargs}
pytest -n 0 -m "serial" test/pulp_integration {[shared]pytest_cov_args} {posargs}
[testenv:integration{,-py39,-py310,-py311,-py312,-py313,-py314}]
description = Run integration tests
setenv =
NO_COLOR=1
# rootless podman reads $HOME
passenv =
HOME
KEEP_IMAGES
NO_COLOR
commands =
pytest -n auto -m "not serial" test/integration {[shared]pytest_cov_args} {posargs}
pytest -n 0 -m "serial" test/integration {[shared]pytest_cov_args} {posargs}
[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
allowlist_externals = /bin/sh
commands =
/bin/sh -c "rm -rf {toxinidir}/test/coverage/*"
/bin/sh -c "rm -rf {toxinidir}/docs/{_,}build"