forked from ansible-collections/community.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
52 lines (44 loc) · 1.46 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
[tox]
skipsdist=True
envlist = clean,ansible{2.12,2.13}-py{38,39,310}-{with_constraints,without_constraints},linters
[testenv]
description = Run the test-suite and generate a HTML coverage report
deps =
pytest
pytest-cov
ansible2.12: ansible-core>2.12,<2.13
ansible2.13: ansible-core>2.13,<2.14
!ansible2.12-!ansible2.13: ansible-core
pytest-ansible
-rtest-requirements.txt
with_constraints: -rtests/unit/constraints.txt
commands = pytest --cov-report html --cov plugins/callback --cov plugins/inventory --cov plugins/lookup --cov plugins/module_utils --cov plugins/modules --cov plugins/plugin_utils plugins {posargs:tests/}
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[testenv:complexity-report]
description = Generate a HTML complexity report in the complexity directory
deps =
# See: https://github.com/lordmauve/flake8-html/issues/30
flake8>=3.3.0,<5.0.0
flake8-html
commands = -flake8 --select C90 --max-complexity 10 --format=html --htmldir={posargs:complexity} plugins
[testenv:black]
deps =
black >=23.0, <24.0
commands =
black {toxinidir}/plugins {toxinidir}/tests
[testenv:linters]
deps =
{[testenv:black]deps}
flake8
commands =
black -v --check {toxinidir}/plugins {toxinidir}/tests
flake8 {posargs} {toxinidir}/plugins {toxinidir}/tests
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,E203,E402,E501,E741,F401,F811,F841,W503
max-line-length = 160
builtins = _