forked from canonical/ansible-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
108 lines (100 loc) · 4.98 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[base]
lint_paths = plugins/ tests/unit/
[tox]
minversion = 4
skipsdist = True
[testenv]
deps =
ansible-core==2.14.5
pytest==7.1.2
pytest-mock==3.8.2
[testenv:coverage]
deps =
{[testenv]deps}
coverage==6.5.0
commands =
-ansible-test coverage erase # On first run, there is nothing to erase.
ansible-test units --venv --coverage
ansible-test coverage html
ansible-test coverage report --omit 'tests/*' --show-missing
[testenv:docs]
deps =
ansible-core==2.14.5
Sphinx
sphinx-rtd-theme
ansible-doc-extractor
commands =
# [[[cog
# import cog
# from pathlib import Path
# for path in sorted(Path("plugins/modules").glob("*.py")):
# cog.outl(
# f"ansible-doc-extractor --template docs/templates/module.rst.j2 "
# f"docs/source/modules {path}")
# ]]]
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/block_device.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/block_device_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/boot_sources_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/dns_domain.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/dns_domain_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/dns_record.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/dns_record_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/fabric.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/fabric_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/instance.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/machine.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/machine_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/network_interface_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/network_interface_link.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/network_interface_physical.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/space.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/space_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/subnet.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/subnet_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/subnet_ip_range.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/subnet_ip_range_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/tag.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/tag_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/user.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/user_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/vlan.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/vlan_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/vm_host.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/vm_host_info.py
ansible-doc-extractor --template docs/templates/module.rst.j2 docs/source/modules plugins/modules/vm_host_machine.py
# [[[end]]]
sphinx-build -M html docs/source docs/build
[testenv:format]
deps =
cogapp
black
isort
commands =
isort {[base]lint_paths}
black -q {[base]lint_paths}
cog -r --verbosity=1 tox.ini
[testenv:sanity]
passenv =
HOME
deps =
ansible-lint==6.22.1
black
flake8
flake8-pyproject
isort
commands =
isort --check-only --diff {[base]lint_paths}
black --check {[base]lint_paths}
flake8 {[base]lint_paths}
ansible-lint
ansible-test sanity --local
[testenv:integration]
passenv =
HOME
commands =
ansible-test integration --requirements --local --diff {posargs}
[testenv:units]
passenv =
HOME
commands =
ansible-test units --venv {posargs}