4ad92f255f
- bumped linters - enabled two more checks and fixed them - cleaned tox.ini file Change-Id: I597c1acb549ebce86fdc1f48487612db6c607f24
70 lines
2.4 KiB
INI
70 lines
2.4 KiB
INI
[tox]
|
|
minversion = 3.8
|
|
envlist = linters,molecule
|
|
skipdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
whitelist_externals = bash
|
|
setenv =
|
|
ANSIBLE_ACTION_PLUGINS={toxinidir}/molecule/roles.galaxy/config_template/action:{toxinidir}/molecule/ansible_plugins/action
|
|
ANSIBLE_CALLBACK_PLUGINS={toxinidir}/molecule/ansible_plugins/callback
|
|
ANSIBLE_FILTER_PLUGINS={toxinidir}/molecule/ansible_plugins/filter
|
|
ANSIBLE_LIBRARY={toxinidir}/molecule/roles.galaxy/config_template/library:{toxinidir}/molecule/ansible_plugins/modules
|
|
ANSIBLE_MODULE_UTILS={toxinidir}/molecule/ansible_plugins/module_utils
|
|
ANSIBLE_ROLES_PATH={toxinidir}/molecule/roles.galaxy:{toxinidir}/
|
|
ANSIBLE_INVENTORY={toxinidir}/molecule/tests/hosts.ini
|
|
ANSIBLE_NOCOWS=1
|
|
ANSIBLE_RETRY_FILES_ENABLED=0
|
|
ANSIBLE_STDOUT_CALLBACK=debug
|
|
ANSIBLE_LOG_PATH={envlogdir}/ansible-execution.log
|
|
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
|
|
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
|
|
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
|
|
|
[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:ansible-lint]
|
|
basepython = python3
|
|
envdir = {toxworkdir}/linters
|
|
commands =
|
|
bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/molecule/roles.galaxy' \
|
|
ansible-galaxy install -fr {toxinidir}/molecule/ansible-role-requirements.yml"
|
|
python -m pre_commit run -a
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
whitelist_externals = bash
|
|
commands = bash -c ci-scripts/releasenotes_tox.sh
|
|
|
|
[testenv:linters]
|
|
deps =
|
|
-r {toxinidir}/requirements.txt
|
|
-r {toxinidir}/test-requirements.txt
|
|
-r {toxinidir}/molecule/molecule-requirements.txt
|
|
commands =
|
|
# check only modified files:
|
|
python -m pre_commit run --source HEAD^ --origin HEAD
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# E265 deals withs paces inside of comments
|
|
show-source = True
|
|
ignore = E123,E125,E265,H238
|
|
builtins = _
|