diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:03:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:03:42 +0000 |
commit | 66cec45960ce1d9c794e9399de15c138acb18aed (patch) | |
tree | 59cd19d69e9d56b7989b080da7c20ef1a3fe2a5a /ansible_collections/vmware/vmware_rest/tox.ini | |
parent | Initial commit. (diff) | |
download | ansible-upstream.tar.xz ansible-upstream.zip |
Adding upstream version 7.3.0+dfsg.upstream/7.3.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/vmware/vmware_rest/tox.ini')
-rw-r--r-- | ansible_collections/vmware/vmware_rest/tox.ini | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/ansible_collections/vmware/vmware_rest/tox.ini b/ansible_collections/vmware/vmware_rest/tox.ini new file mode 100644 index 00000000..966c7cbc --- /dev/null +++ b/ansible_collections/vmware/vmware_rest/tox.ini @@ -0,0 +1,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/ |