Merge "Update cloud image Ubuntu18.04 mininet ovs"
[releng/builder.git] / tox.ini
1 [tox]
2 minversion = 1.6
3 envlist = docs,docs-linkcheck,jjb-version,prefix,robot,
4 #    pre-commit
5 skipsdist = true
6
7 [testenv:docs]
8 deps = -rdocs/requirements.txt
9 commands = sphinx-build -q -W -b html -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
10
11 [testenv:docs-linkcheck]
12 passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
13 basepython = python3
14 deps = -rdocs/requirements.txt
15 commands = sphinx-build -q -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
16
17 [testenv:jenkins-jobs]
18 deps =
19     jenkins-job-builder=={env:JJB_VERSION:4.1.0}
20 commands =
21     jenkins-jobs {posargs:--help}
22
23 [testenv:jjb-version]
24 commands = python {toxinidir}/check_jjb_version.py
25
26 [testenv:pre-commit-install]
27 basepython = python3
28 deps = pre-commit
29 commands =
30     pre-commit install
31     pre-commit install --hook-type commit-msg
32
33 [testenv:pre-commit-uninstall]
34 basepython = python3
35 deps = pre-commit
36 commands =
37     pre-commit uninstall
38     pre-commit uninstall --hook-type commit-msg
39
40 [testenv:pre-commit]
41 basepython = python3
42 deps = pre-commit
43 passenv = HOME
44 commands =
45     pre-commit run --all-files --show-diff-on-failure
46     pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
47     # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage.
48     # Its default arguments --passed and --msg-filename are different from CI recommandations.
49     # As a result, the line above is always skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file.
50
51 [testenv:prefix]
52 commands = python {toxinidir}/check_prefix.py
53
54 [testenv:robot]
55 basepython = python3
56 commands = python {toxinidir}/check_robot.py
57
58 [testenv:cut-branch-jobs]
59 basepython = python3
60 deps =
61     pre-commit
62     ruamel.yaml
63 commands =
64     python scripts/cut-branch-jobs.py {posargs:--help} {toxinidir}/jjb
65     - pre-commit run --all-files prettier
66
67 [testenv:checkbashisms]
68 deps =
69 whitelist_externals = sh
70                       find
71                       checkbashisms
72 commands =
73     sh -c 'which checkbashisms>/dev/null  || sudo yum install devscripts-minimal || sudo apt-get install devscripts \
74         || (echo "checkbashisms command not found - please install it (e.g. sudo apt-get install devscripts | \
75         yum install devscripts-minimal )" >&2 && exit 1)'
76     find . -not -path '*/\.*' -name *.sh -exec checkbashisms -f  \{\} +