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
|
[tox]
minversion = 1.4.2
envlist = linters
skipsdist = True
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install {opts} {packages}
[testenv:black]
deps =
black==19.10b0
click==8.0.2
commands =
black {toxinidir}/plugins {toxinidir}/tests
[testenv:add_docs]
deps = git+https://github.com/ansible-network/collection_prep
commands = collection_prep_add_docs -p .
[testenv:refresh_modules]
deps =
git+https://github.com/ansible-collections/vmware_rest_code_generator
black==19.10b0
click==8.0.2
commands =
vmware_rest_code_generator_refresh_modules --target-dir . {posargs}
vmware_rest_code_generator_refresh_examples --target-dir .
black {toxinidir}/plugins {toxinidir}/tests
echo "now you can update the RETURN block, see https://github.com/ansible-collections/vmware_rest_code_generator#how-to-refresh-the-vmwarevmware_rest-content"
allowlist_externals =
echo
[testenv:build_manual]
deps = -r{toxinidir}/docs-requirements.txt
changedir = {toxinidir}/manual/source
commands =
sphinx-build -b rst {toxinidir}/manual/source {toxinidir}/docs/docsite/rst
cp -v {toxinidir}/manual/source/guide_vmware_rest.rst {toxinidir}/docs/docsite/rst/
sphinx-build -c {toxinidir}/manual/source {toxinidir}/docs/docsite/rst {toxinidir}/manual/build
bash -c "find {toxinidir}/docs/docsite/rst/vmware_rest_scenarios -type f -name '*.rst'|xargs -n1 sed -i 's,.. _ansible-collections-vmware-vmware-rest-docsite-,.. _ansible_collections.vmware.vmware_rest.docsite.,'"
allowlist_externals =
cp
bash
setenv =
HOME = {env:HOME}
VMWARE_HOST = {env:VMWARE_HOST}
VMWARE_USER = {env:VMWARE_USER}
VMWARE_PASSWORD = {env:VMWARE_PASSWORD}
ESXI1_HOSTNAME = {env:ESXI1_HOSTNAME}
ESXI1_USERNAME = {env:ESXI1_USERNAME}
ESXI1_PASSWORD = {env:ESXI1_PASSWORD}
ESXI2_HOSTNAME = {env:ESXI2_HOSTNAME}
ESXI2_USERNAME = {env:ESXI2_USERNAME}
ESXI2_PASSWORD = {env:ESXI2_PASSWORD}
VMWARE_VALIDATE_CERTS = {env:VMWARE_VALIDATE_CERTS}
[testenv:linters]
deps =
black==19.10b0
click==8.0.2
flake8
antsibull-changelog
antsibull
commands =
black -v --check {toxinidir}/plugins {toxinidir}/tests
flake8 {posargs} {toxinidir}/plugins {toxinidir}/tests
antsibull-changelog lint
antsibull-lint collection-docs .
[testenv:antsibull-changelog]
deps =
antsibull-changelog
commands =
antsibull-changelog {posargs}
[testenv:venv]
commands = {posargs}
[testenv:pytest]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
pytest
commands =
mkdir -p {envdir}/lib/python3.7/site-packages/ansible_collections/ansible/vmware_rest
cp -pr plugins {envdir}/lib/python3.7/site-packages/ansible_collections/ansible/vmware_rest
py.test -v {posargs}
whitelist_externals =
mkdir
cp
touch
[testenv:py36-sanity]
deps = ansible
commands = ansible-test sanity --debug --requirements --local --skip-test future-import-boilerplate --skip-test metaclass-boilerplate --python 3.6
setenv =
HOME = /tmp
[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 = _
exclude = .git,.tox,tests/unit/compat/
|