diff --git a/tox-ansible.ini b/tox-ansible.ini index 8329457b..81efe96b 100644 --- a/tox-ansible.ini +++ b/tox-ansible.ini @@ -1,83 +1,45 @@ -[testenv:sanity-py3.12-devel] +[testenv:sanity-*] +description = Run ansible-test sanity (generic) type = VirtualEnvRunner +runner = virtualenv +base = testenv +skip_install = True +package = skip + +# Generic env directories +envdir = {toxworkdir}/{envname} set_env = - ANSIBLE_COLLECTIONS_PATH=/home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/tmp/collections/ + ANSIBLE_COLLECTIONS_PATH={envtmpdir}/collections PIP_DISABLE_PIP_VERSION_CHECK=1 - PYTHONHASHSEED=3868722208 PYTHONIOENCODING=utf-8 -base = testenv -runner = virtualenv -description = Sanity tests using ansible-core devel and python 3.12 -depends = -env_name = sanity-py3.12-devel -labels = -env_dir = /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel -env_tmp_dir = /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/tmp -env_log_dir = /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/log -suicide_timeout = 0.0 -interrupt_timeout = 0.3 -terminate_timeout = 0.2 -platform = + pass_env = CC - CCSHARED CFLAGS CPPFLAGS - CURL_CA_BUNDLE - CXX - GITHUB_TOKEN HOME LANG LANGUAGE - LDFLAGS - LD_LIBRARY_PATH PIP_* - PKG_CONFIG - PKG_CONFIG_PATH - PKG_CONFIG_SYSROOT_DIR - REQUESTS_CA_BUNDLE - SSL_CERT_FILE - TMPDIR - VIRTUALENV_* http_proxy https_proxy no_proxy -parallel_show_output = False -recreate = False + allowlist_externals = bash - cp - git - rm rsync mkdir cd - echo -pip_pre = False -install_command = python -I -m pip install '{packages}' -constrain_package_deps = False -use_frozen_constraints = False -list_dependencies_command = python3 -m pip freeze --all + git + commands_pre = - mkdir /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/tmp/collection_build - bash -c 'cd /home/bthornto/github/tox-ansible/docs && rsync -r --cvs-exclude --filter=":- .gitignore" . /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/tmp/collection_build' - bash -c 'cd /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/tmp/collection_build && ansible-galaxy collection build && ansible-galaxy collection install ansible-sample-*.tar.gz -p /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/tmp/collections' - bash -c 'cd /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/tmp/collections/ansible_collections/ansible/sample && git config --global init.defaultBranch main && git init .' -commands = bash -c 'cd /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/tmp/collections/ansible_collections/ansible/sample && ansible-test sanity --local --requirements --python 3.12' -commands_post = -change_dir = /home/bthornto/github/tox-ansible/docs -args_are_paths = True -ignore_errors = False -ignore_outcome = False -base_python = py3.12 -env_site_packages_dir = /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/lib/python3.12/site-packages -env_bin_dir = /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/bin -env_python = /home/bthornto/github/tox-ansible/docs/sanity-py3.12-devel/bin/python -py_dot_ver = 3.12 -py_impl = cpython -deps = https://github.com/ansible/ansible/archive/devel.tar.gz -system_site_packages = False -always_copy = False -download = False -skip_install = True -package = skip + mkdir -p {envtmpdir}/collection_build + rsync -r --cvs-exclude --filter=":- .gitignore" . {envtmpdir}/collection_build + bash -c 'cd {envtmpdir}/collection_build && ansible-galaxy collection build && ansible-galaxy collection install *.tar.gz -p {envtmpdir}/collections' + bash -c 'cd {envtmpdir}/collections/ansible_collections/*/* && git config --global init.defaultBranch main && git init .' + +commands = + bash -c 'cd {envtmpdir}/collections/ansible_collections/*/* && ansible-test sanity --local --requirements' + +deps = + https://github.com/ansible/ansible/archive/devel.tar.gz