X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=tox.ini;h=29ba23614d130b744ea5143243a524fffdfd3217;hb=refs%2Fheads%2Fv0.45.x;hp=8f9cb5130c16e27f591daf0bdf117c9ae656e6b1;hpb=6a177f2aa47a827ac661f3f5d1bb61035bf83588;p=releng%2Fglobal-jjb.git diff --git a/tox.ini b/tox.ini index 8f9cb513..29ba2361 100644 --- a/tox.ini +++ b/tox.ini @@ -1,28 +1,100 @@ [tox] minversion = 1.6 -envlist = coala,jjb +envlist = + coala, + ensure-documented, + jjb, + jjb-compare-xml, + jjb-latest, + jjb-version, + license, + pre-commit skipsdist = true +passenv = TOX_WORK_DIR +toxworkdir = {env:TOX_WORK_DIR:/tmp/v} [testenv:coala] basepython = python3 deps = coala coala-bears + pygments~=2.3.1 + # request-2.22.0 does not work with python-3.4.9 + requests~=2.21.0 # Markdown lint requires nodejs nodeenv + # numpy-1.17.0 requires python 3.5 + numpy~=1.16.4 commands = nodeenv -p npm install --global remark-cli remark-lint write-good python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger coala --non-interactive +[testenv:docs] +basepython = python3 +deps = -rrequirements.txt +commands = + sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html + +[testenv:ensure-documented] +commands = + ./ensure-documented.sh + [testenv:jjb] +basepython = python3 +deps = + jenkins-job-builder==2.8.0 +commands = + jenkins-jobs -l DEBUG test --recursive -o {toxinidir}/archives/job-configs {toxinidir}/jjb:{toxinidir}/.jjb-test + +[testenv:jjb-compare-xml] +basepython = python3 +deps = + jenkins-job-builder +commands = + ./jjb-compare-xml.sh + +[testenv:jjb-latest] +basepython = python3 deps = jenkins-job-builder commands = - cp test.template {toxinidir}/jjb/test.yaml - jenkins-jobs -l DEBUG test --recursive -o {toxinidir}/archives/job-configs {toxinidir}/jjb/ - rm {toxinidir}/jjb/test.yaml -whitelist_externals = - cp - rm + jenkins-jobs -l DEBUG test --recursive -o {toxinidir}/archives/job-configs {toxinidir}/jjb:{toxinidir}/.jjb-test + +[testenv:jjb-version] +basepython = python3 +commands = python {toxinidir}/check_jjb_version.py + +[testenv:license] +deps = lftools +commands = lftools license check-dir -r '.+' shell + +[testenv:pre-commit] +basepython = python3 +deps = + pre-commit +commands = + pre-commit run --all-files + +######### +# Tools # +######### + +[testenv:jenkins-jobs] +deps = + jenkins-job-builder{env:JJB_VERSION_OP:~=}{env:JJB_VERSION:2.8.0} +commands = + jenkins-jobs {posargs:--help} + +[testenv:lftools] +deps = lftools{env:LFTOOLS_VERSION_OP:~=}{env:LFTOOLS_VERSION:0.13.0} +commands = lftools {posargs:--help} + +[testenv:openstack] +deps = python-openstackclient{env:OPENSTACK_VERSION_OP:~=}{env:OPENSTACK_VERSION:3.15.0} +commands = openstack {posargs:--help} + +[testenv:reno] +deps = reno{env:RENO_VERSION_OP:~=}{env:RENO_VERSION:2.10.0} +commands = reno {posargs:--help}