[tox]
minversion = 1.6
envlist =
- docs,
- docs-linkcheck
+ docs,
+ docs-linkcheck,
+ pre-commit
skipsdist = true
+passenv = TOX_WORK_DIR
+toxworkdir = {env:TOX_WORK_DIR:/tmp/v}
[testenv:docs]
deps = -rdocs/requirements.txt
commands =
sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
echo "Generated docs available in {toxinidir}/docs/_build/html"
-whitelist_externals = echo
+allowlist_externals = echo
[testenv:docs-linkcheck]
deps = -rdocs/requirements.txt
commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+
+[testenv:pre-commit]
+basepython = python3
+allowlist_externals = rm
+deps =
+ pre-commit
+commands =
+ pre-commit install
+ pre-commit run --all-files