tripleo-ci/tox.ini

50 lines
1.3 KiB
INI

[tox]
# keep py3 before py2 to assure they are preffered for envs like linters:
envlist = linters,py{37,36,35,27},molecule
minversion = 3.4.0
ignore_basepython_conflict = True
skip_missing_interpreters = True
[testenv]
usedevelop = True
setenv =
ANSIBLE_FORCE_COLOR=1
ANSIBLE_INVENTORY={toxinidir}/test/hosts.ini
ANSIBLE_NOCOWS=1
ANSIBLE_RETRY_FILES_ENABLED=0
ANSIBLE_STDOUT_CALLBACK=debug
PY_COLORS=1
VIRTUAL_ENV={envdir}
# Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
PIP_DISABLE_PIP_VERSION_CHECK=1
TEST_PARAMS=--cov=emit_releases_file -k "not molecule"
molecule: TEST_PARAMS=-ra -k molecule --ignore=roles/build-containers/files
passenv =
ANSIBLE_*
CURL_CA_BUNDLE
DOCKER_*
MOLECULE_*
REQUESTS_CA_BUNDLE
SSH_AUTH_SOCK
SSL_CERT_FILE
TERM
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
whitelist_externals =
bash
commands_pre =
pip install -q bindep
bindep test
commands =
python -m pytest --html={envlogdir}/reports.html --self-contained-html {tty:-s} {env:TEST_PARAMS} {posargs}
[testenv:venv]
commands = {posargs}
[testenv:linters]
deps =
pre-commit>=1.20.0
commands =
python -m pre_commit run -a