CI: Add sonar-project.properties
[iec.git] / tox.ini
diff --git a/tox.ini b/tox.ini
index f2f331f..1bb1153 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -8,17 +8,29 @@
 [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