9b939e1b40
Tox 4 deprecated whitelist_externals. Replace whitelist_externals with allowlist_externals. Also, add bash to allowlist_externals on generatepot tox env. Related-Bug: #2000399 Change-Id: I3bb050b8abf3b32929eb0379eb8ac1bb84951803
69 lines
1.6 KiB
INI
69 lines
1.6 KiB
INI
[tox]
|
|
minversion = 3.1.0
|
|
envlist = docs,pep8
|
|
ignore_basepython_conflict = True
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython=python3
|
|
usedevelop = True
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:ansible]
|
|
deps =
|
|
{[testenv]deps}
|
|
-r{toxinidir}/ansible-requirement.txt
|
|
passenv = HOME
|
|
setenv =
|
|
ANSIBLE_CONFIG = {toxinidir}/playbook/tests/ansible.cfg
|
|
commands = {posargs}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
setenv =
|
|
SPHINX_WARNINGS_TRANS=1
|
|
commands =
|
|
doc8 doc/source
|
|
# Build translated guides
|
|
docstheme-build-translated.sh
|
|
|
|
[testenv:pdf-docs]
|
|
allowlist_externals =
|
|
make
|
|
commands =
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8
|
|
bash {toxinidir}/tools/check-po.sh {toxinidir}/doc {toxinidir}/glossary
|
|
python {toxinidir}/tools/check_yaml_file.py {toxinidir}/tools/zanata/translation_team.yaml
|
|
bash {toxinidir}/tools/check-zanata-users-list.sh
|
|
{[testenv:generatepot]commands}
|
|
allowlist_externals = bash
|
|
|
|
[testenv:generatepot]
|
|
# Generate POT files for translation
|
|
commands =
|
|
bash {toxinidir}/tools/generatepot.sh
|
|
allowlist_externals = bash
|
|
|
|
[testenv:zanata-users-sync]
|
|
commands =
|
|
python {toxinidir}/tools/zanata/zanata_users.py --output-file {toxinidir}/tools/zanata/translation_team.yaml
|
|
|
|
[doc8]
|
|
# File extensions to check
|
|
extensions = .rst, .yaml
|
|
# Maximal line length should be 80 but we have some overlong lines.
|
|
# Let's not get far more in.
|
|
max-line-length = 80
|
|
# Disable some doc8 checks:
|
|
# D000: Check RST validity
|
|
# - cannot handle "none" for code-block directive
|
|
ignore = D000
|