Files
openstack-helm/tox.ini
Doug Goldstein 85b986cf3e chore: add pre-commit and hook it into Zuul
A number of OpenStack projects have adopted pre-commit and run it as
their lint step so that developers have an easy way to run the same
checks locally that will run in the CI loop. So this adds an initial
pre-commit config to detect trailing whitespace and replaces that
existing check to be called via pre-commit. Added a tox environment for
running pre-commit as well.

Change-Id: I9cf95f0c6db166ee1e59f8aedf376c511ac23010
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-07-29 16:45:28 -05:00

51 lines
1.4 KiB
INI

[tox]
minversion = 3.1
envlist = docs
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
passenv = *_proxy,*_PROXY
[testenv:venv]
commands = {posargs}
[testenv:linters]
deps = pre-commit
allowlist_externals = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure {posargs}
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
make helm-docs
sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
allowlist_externals =
make
rm
; NOTE(kozhukalov): Temporarily disable the pdf generation because
; it is broken after merging the openstack-helm-infra.
; It is likely due to long lines.
; [testenv:pdf-docs]
; envdir = {toxworkdir}/docs
; deps = {[testenv:docs]deps}
; allowlist_externals =
; make
; rm
; commands =
; rm -rf doc/build/pdf
; make helm-docs
; sphinx-build -W --keep-going -b latex -j auto doc/source doc/build/pdf
; make -C doc/build/pdf
[testenv:releasenotes]
deps = -r{toxinidir}/releasenotes/requirements.txt
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html