ansible-role-collect-logs/tox.ini

82 lines
2.1 KiB
INI

[tox]
# for tty option
minversion = 3.4.0
envlist = docs, linters, molecule
skipsdist = True
requires =
tox-ansible >= 1.5.3
[testenv]
usedevelop = True
# Do not use openstack constraint files here, this repository is used for CI
# and should not be subject to these.
passenv =
ANSIBLE_*
CURL_CA_BUNDLE
PODMAN_*
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
# failsafe mechanism to avoid accidental disablement of tests
# 2/3 molecule scenarios are expected to pass
PYTEST_REQPASS=2
deps =
ansible-core>=2.11,<2.12
molecule[test,podman]>=3.3.2,<3.4 # MIT
pytest-molecule>=1.4.0
pytest-plus # provides support for PYTEST_REQPASS
commands =
ansible-galaxy collection install --force containers.podman:=1.8.2 community.general:=4.0.2
python -m pytest --color=yes --html={envlogdir}/reports.html --self-contained-html {tty:-s} -k molecule {posargs}
[testenv:ansible]
description = Used as base for all tox-ansible environments
# https://github.com/ansible-community/tox-ansible/issues/96
[testenv:sanity]
usedevelop = False
deps =
[testenv:units]
usedevelop = False
deps =