[tox] envlist = linters, py27, py35, py36, py37 ignore_basepython_conflict = True skip_missing_interpreters = True [testenv] usedevelop = True setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt [testenv:venv] basepython = python3 commands = {posargs} [testenv:pyflakes] basepython = python3 deps = pyflakes commands = pyflakes setup.py scripts [testenv:linters] basepython = python3 whitelist_externals = bash commands = python -m pre_commit run --source HEAD^ --origin HEAD # deprecated: use linters instead. kept only as a convenience alias [testenv:pep8] basepython = python3 envdir = {toxworkdir}/linters whitelist_externals = {[testenv:linters]whitelist_externals} commands = {[testenv:linters]commands} [testenv:cireport] basepython = python3 passenv = SSH_AUTH_SOCK commands = python scripts/tripleo-jobs-gerrit.py {posargs} # This environment can be used to quickly validate that all needed system # packages required to successfully execute test targets are installed [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 # This environment is used to run unit tests [testenv:py27] deps = {[testenv]deps} changedir = scripts/emit_releases_file commands = pytest {posargs:--cov=emit_releases_file} [testenv:py35] basepython = python3 deps={[testenv]deps} changedir = {[testenv:py27]changedir} commands = {[testenv:py27]commands}