X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tox.ini;h=5ff30f8be59796838cf47be2e9b82f6d6e5dc364;hb=refs%2Fheads%2Fmaster;hp=e33d587c111f371043776c7f1cd09a1e9abcf78d;hpb=4ffa55dd2af99d479deaceb1be4a776d74677dac;p=ci-management.git diff --git a/tox.ini b/tox.ini index e33d587c..5eae10e5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,16 +1,35 @@ [tox] minversion = 1.6 -envlist = coala +envlist = pre-commit skipsdist = true -[testenv:coala] -basepython = python3 +[testenv:jenkins-jobs] deps = - coala==0.11 - coala-bears==0.11 - nodeenv~=1.3.0 + jenkins-job-builder=={env:JJB_VERSION:6.0.0} +commands = + jenkins-jobs {posargs:--help} + +[testenv:pre-commit-install] +basepython = python3 +deps = pre-commit +commands = + pre-commit install + pre-commit install --hook-type commit-msg + +[testenv:pre-commit-uninstall] +basepython = python3 +deps = pre-commit +commands = + pre-commit uninstall + pre-commit uninstall --hook-type commit-msg + +[testenv:pre-commit] +basepython = python3 +deps = pre-commit +passenv = HOME commands = - nodeenv -p - npm install --global write-good - python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger - coala --non-interactive + pre-commit run --all-files --show-diff-on-failure + pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG + # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage. + # Its default arguments --passed and --msg-filename are different from CI recommandations. + # As a result, the line above is always skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file.