[go: up one dir, main page]

File: tox.ini

package info (click to toggle)
ansible-runner 2.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,232 kB
  • sloc: python: 9,896; makefile: 19
file content (57 lines) | stat: -rw-r--r-- 1,730 bytes parent folder | download
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
[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}: ansible-core
       integration{,-py39,-py310,-py311,-py312}: 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}]
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}]
description = Run unit tests
commands = pytest -vv -n auto {posargs:test/unit} {[shared]pytest_cov_args}

[testenv:integration{,-py39,-py310,-py311,-py312}]
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"