From: Guillaume Lambert Date: Fri, 28 May 2021 12:56:51 +0000 (+0200) Subject: CI: kick git hook pre-commit install out from CI X-Git-Tag: v0.7.0~3 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=c284ce932a63701cc5c5711c551f38cb1c5705ed;p=releng%2Fdocs-conf.git CI: kick git hook pre-commit install out from CI 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 Change-Id: Idd7f1757b9814edfdeeb4013d086c8c63a6d812d --- diff --git a/tox.ini b/tox.ini index 88c59d6..a1f2e6b 100644 --- a/tox.ini +++ b/tox.ini @@ -26,11 +26,22 @@ deps = -rdocs/requirements.txt 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 @@ -38,3 +49,4 @@ commands = basepython = python3 deps = -rdocs/requirements.txt commands = reno {posargs:--help} +