forked from ansible/ansible-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
49 lines (43 loc) · 1.31 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
[tox]
envlist = linters, ansible{27, 28, 29, -base}
skipsdist = True
[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,38,39,310}: ansible-core
integration{,-py38,-py39,-py310}: ansible-core
-r {toxinidir}/requirements.txt
-r {toxinidir}/test/requirements.txt
passenv = HOME
usedevelop = True
commands = pytest {posargs}
[testenv:linters]
description = Run code linters
basepython = python3.8
commands=
flake8 --version
flake8 docs ansible_runner test
yamllint --version
yamllint -s .
[testenv:unit{,-py38,-py39,-py310}]
description = Run unit tests
commands = pytest {posargs:test/unit}
[testenv:integration{,-py38,-py39,-py310}]
description = Run integration tests
commands = pytest {posargs:test/integration}
[testenv:docs]
description = Build documentation
deps = -r{toxinidir}/docs/requirements.txt
commands =
sphinx-build -T -E -W --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"