[tox] # for tty option minversion = 3.4.0 envlist = docs, linters, molecule skipdist = True [testenv] usedevelop = True install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages} passenv = ANSIBLE_* CURL_CA_BUNDLE DOCKER_* HOME REQUESTS_CA_BUNDLE SSH_AUTH_SOCK SSL_CERT_FILE TERM setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/test-requirements.txt whitelist_externals = bash [testenv:bindep] basepython = python3 # Do not install any requirements. We want this to be fast and work even if # system dependencies are missing, since it's used to tell you what system # dependencies are missing! This also means that bindep must be installed # separately, outside of the requirements files. deps = bindep commands = bindep test [testenv:linters] basepython = python3 setenv = ANSIBLE_LIBRARY=./library commands = # check only modified files: python -m pre_commit run -a [testenv:releasenotes] basepython = python3 whitelist_externals = bash commands = bash -c ci-scripts/releasenotes_tox.sh [testenv:venv] basepython = python3 commands = {posargs} [testenv:molecule] setenv = ANSIBLE_FORCE_COLOR=1 ANSIBLE_CALLBACK_WHITELIST=profile_tasks ANSIBLE_SHOW_CUSTOM_STATS=1 PYTHONPATH={env:PYTHONPATH:}:library deps = ansi2html # GPL (soft-dependency of pytest-html) ansible>=2.9 docker>=4.0.1 mock molecule==3.0.0,<3.1.0 # MIT paramiko>=2.5.0 # LGPL (soft-dependency of docker that enables ssh protocol) pytest-cov # MIT pytest-html # MPL 2.0 pytest-molecule>=1.2.4 # MIT pytest-xdist pyyaml selinux>=0.2.1 # MIT commands = python -m pytest --color=yes --html={envlogdir}/reports.html --self-contained-html {tty:-s} {posargs}