-
Notifications
You must be signed in to change notification settings - Fork 359
/
tox.ini
58 lines (51 loc) · 1.74 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
[tox]
envlist = linters, ansible{27, 28, 29, -base}
requires =
tox>4
setuptools>=64
[shared]
pytest_cov_args = --cov --cov-report html --cov-report term --cov-report xml
[testenv]
description = Run tests with {basepython}
deps = ansible27: ansible<2.8
ansible28: ansible<2.9
ansible29: ansible<2.10
ansible-base: ansible-base
py{,3,39,310,311,312,313}: ansible-core
integration{,-py39,-py310,-py311,-py312,-py313}: ansible-core
build
-r {toxinidir}/test/requirements.txt
passenv =
HOME
RUNNER_TEST_IMAGE_NAME
usedevelop = True
commands = pytest -vv -n auto {posargs}
[testenv:linters{,-py39,-py310,-py311,-py312,-py313}]
description = Run code linters
commands =
flake8 --version
flake8 docs src/ansible_runner test
yamllint --version
yamllint -s .
mypy src/ansible_runner
pylint src/ansible_runner test
[testenv:unit{,-py39,-py310,-py311,-py312,-py313}]
description = Run unit tests
commands = pytest -vv -n auto {posargs:test/unit} {[shared]pytest_cov_args}
[testenv:integration{,-py39,-py310,-py311,-py312,-py313}]
description = Run integration tests
commands =
pytest -vv -n auto {posargs:test/integration} {[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"