[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:add_docs] deps = git+https://github.com/ansible-network/collection_prep commands = collection_prep_add_docs -p . [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:black] depends = isort deps = black >=23.0, <24.0 commands = black -v {toxinidir}/plugins {toxinidir}/tests [testenv:isort] deps = isort commands = isort --profile black {toxinidir}/plugins {toxinidir}/tests [testenv:linters] deps = black click==8.0.2 flake8 antsibull-changelog antsibull-docs {[testenv:isort]deps} commands = black -v --check {toxinidir}/plugins {toxinidir}/tests isort --profile black --check-only --diff {toxinidir}/plugins {toxinidir}/tests flake8 {posargs} {toxinidir}/plugins {toxinidir}/tests antsibull-changelog lint-changelog-yaml changelogs/changelog.yaml antsibull-docs 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/