-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
120 lines (108 loc) · 2.13 KB
/
tox.ini
File metadata and controls
120 lines (108 loc) · 2.13 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
[tox]
requires =
tox>=4.0.0
env_list =
py{310,311,312}-ansible{2.16,2.17}
integration
linters
units
[testenv]
package = wheel
wheel_build_env = .pkg
extras =
test
deps =
ansible2.16: ansible-core>=2.16.0,<2.17.0
ansible2.17: ansible-core>=2.17.0,<2.18.0
-r{toxinidir}/test-requirements.txt
commands =
ansible-test units --venv -v
[testenv:linters]
deps =
ansible-lint
flake8
isort
black
yamllint
mypy
commands =
ansible-lint --version
ansible-lint
flake8 plugins
isort --check-only --diff plugins tests
black --check --diff plugins tests
yamllint .
mypy plugins
[testenv:units]
deps =
ansible-core
pytest
pytest-ansible
pytest-cov
-r{toxinidir}/test-requirements.txt
commands =
ansible-test units --coverage -v
[testenv:integration]
deps =
ansible-core
ansible-runner
pytest
pytest-ansible
-r{toxinidir}/test-requirements.txt
commands =
ansible-test integration --coverage -v
[testenv:sanity]
deps =
ansible-core
commands =
ansible-test sanity --requirements
[testenv:coverage-report]
deps =
coverage[toml]
depends =
units
integration
commands =
coverage combine
coverage report
coverage html
# Pre-commit environment for development
[testenv:pre-commit]
deps =
pre-commit
commands =
pre-commit run --all-files
# Documentation building
[testenv:docs]
deps =
sphinx
sphinx-rtd-theme
ansible-core
commands =
sphinx-build -b html docs docs/_build/html
# Galaxy build and publish
[testenv:galaxy]
deps =
ansible-core
commands =
ansible-galaxy collection build
ansible-galaxy collection publish drivenets-dnos-*.tar.gz --token {env:GALAXY_API_TOKEN:}
# flake8 configuration is in .flake8 file
[coverage:run]
source = plugins
omit =
*/test_*
*/__pycache__/*
*/.*
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
class .*\bProtocol\):
@(abc\.)?abstractmethod