5795847107
This fixes failures produced when project name doesn't starts with 'openstack/' This is intended to unblock the use of tripleo-ci that is now failing with projects that are not hosted under the 'openstack/' prefix (like for example x/tobiko). Note: removed set -u because this can break source activate on old versions of virtualenv. The role should not fail when it fails to find a mapping, so it was refactored to assured that. Also assures that the html report of Ansible is colored, making it easier to read. Change-Id: Ibb562f818419373700177f3b2e665cd4eb5e32ef Partial-Bug: #1859167 Partial-Bug: #1858890
69 lines
1.6 KiB
INI
69 lines
1.6 KiB
INI
[tox]
|
|
minversion = 3.4.0
|
|
envlist = linters
|
|
skipdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
setenv =
|
|
ANSIBLE_FORCE_COLOR=1
|
|
passenv =
|
|
ANSIBLE_*
|
|
CURL_CA_BUNDLE
|
|
DOCKER_*
|
|
MOLECULE_*
|
|
REQUESTS_CA_BUNDLE
|
|
SSH_AUTH_SOCK
|
|
SSL_CERT_FILE
|
|
TERM
|
|
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:docs]
|
|
basepython = python3
|
|
commands = python setup.py build_sphinx
|
|
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
whitelist_externals = bash
|
|
commands = bash -c ci-scripts/releasenotes_tox.sh
|
|
|
|
[testenv:linters]
|
|
basepython = python3
|
|
deps =
|
|
jinja2
|
|
pre-commit
|
|
commands =
|
|
python -m pre_commit run -a
|
|
# TODO(ssbarnea) make is a real pre-commit hook so we can reuse it
|
|
python ci-scripts/validate_jinja2.py
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:molecule]
|
|
deps =
|
|
ansible
|
|
ansi2html # GPL (soft-dependency of pytest-html)
|
|
docker
|
|
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.3 # MIT
|
|
selinux # MIT
|
|
mock
|
|
molecule>=3.0a4
|
|
commands =
|
|
python -m pytest --color=yes --html={envlogdir}/reports.html --self-contained-html -rA --molecule-unavailable-driver=fail {tty:-s} {posargs:-k 'molecule and docker'}
|