forked from ansible/ansible-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
51 lines (44 loc) · 1.32 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
[tox]
envlist = linters, unit
isolated_build = True
[testenv]
description = Run all tests with {basepython}
usedevelop = True
deps =
-r {toxinidir}/test/requirements.txt
commands = pytest {posargs}
[testenv:linters]
description = Run code linters
commands =
flake8 --version
flake8 ansible_builder test
yamllint --version
yamllint -s .
[testenv:unit{,-py38,-py39,-py310}]
description = Run unit tests
commands = pytest {posargs:test/unit}
[testenv:pulp-integration{,-py310}]
# 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 1 -m "serial" {posargs:test/pulp_integration}
[testenv:integration{,-py38,-py39,-py310}]
description = Run integration tests
# rootless podman reads $HOME
passenv =
HOME
KEEP_IMAGES
commands = pytest {posargs:test/integration}
[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"