pre-commit hook installation is not required to run pre-commit run jobs.
And thus it is not wishable in CI and morevover in a local context since
no uninstallation method is provided in tox.
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: Idd7f1757b9814edfdeeb4013d086c8c63a6d812d
commands =
sphinx-build -q -j auto --keep-going -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
-[testenv:pre-commit]
+[testenv:pre-commit-install]
basepython = python3
deps = pre-commit
commands =
pre-commit install --hook-type commit-msg
+
+[testenv:pre-commit-uninstall]
+basepython = python3
+deps = pre-commit
+commands =
+ pre-commit uninstall --hook-type commit-msg
+
+[testenv:pre-commit]
+basepython = python3
+deps = pre-commit
+commands =
pre-commit run --all-files --show-diff-on-failure
pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
basepython = python3
deps = -rdocs/requirements.txt
commands = reno {posargs:--help}
+