[DMAAP-STRIMZI] Move strimzi kafka bridge
[oom.git] / tox.ini
1 [tox]
2 minversion = 1.6
3 envlist =
4  docs,
5  docs-linkcheck,
6  gitlint,
7  checkbashisms,
8  pre-commit,
9 skipsdist=true
10
11 [doc8]
12 ignore-path-errors=docs/helm-search.txt;D001
13
14 [testenv:doc8]
15 basepython = python3.8
16 deps =
17     -r{toxinidir}/requirements.txt
18     -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
19     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
20 commands =
21  - doc8 docs/
22
23 [testenv:docs]
24 basepython = python3.8
25 deps =
26     -r{toxinidir}/requirements.txt
27     -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
28     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
29 commands =
30  sphinx-build -q -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
31
32 [testenv:docs-linkcheck]
33 basepython = python3.8
34 deps =
35     -r{toxinidir}/requirements.txt
36     -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
37     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
38 commands = sphinx-build -q -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
39
40 [testenv:spelling]
41 basepython = python3.8
42 whitelist_externals = wget
43 deps =
44     -r{toxinidir}/requirements.txt
45     -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
46     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
47 changedir={toxinidir}/docs
48 commands =
49     wget -nv https://git.onap.org/doc/plain/docs/spelling_wordlist.txt -O spelling_wordlist.txt
50     sphinx-build -b spelling -d {envtmpdir}/doctrees . _build/spelling
51
52 [testenv:gitlint]
53 basepython = python3.8
54 deps =
55     -r{toxinidir}/requirements.txt
56     -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
57     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
58 commands =
59   gitlint
60
61 [testenv:checkbashisms]
62 deps =
63 whitelist_externals =
64     {toxinidir}/.ci/check-bashisms.sh
65 commands =
66     {toxinidir}/.ci/check-bashisms.sh
67
68 [testenv:shellcheck]
69 basepython = python3
70 deps = shellcheck-py
71 whitelist_externals = find
72 commands =
73     find . -not -path '*/\.*' -name *.sh -exec shellcheck \{\} +
74
75 [testenv:autopep8]
76 basepython = python3.8
77 deps =
78     -r{toxinidir}/requirements.txt
79     -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
80     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
81 commands =
82     autopep8 --max-line-length 120 --in-place --recursive kubernetes/ TOSCA/ docs/
83
84 [testenv:pylint]
85 basepython = python3.8
86 deps =
87     -r{toxinidir}/requirements.txt
88     -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
89     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
90 whitelist_externals = find
91 commands =
92     find kubernetes/ TOSCA/ docs/ -name *.py -exec pylint --max-line-length=120 --disable=missing-docstring --method-rgx="(([a-z_][a-zA-Z0-9_]{2,})|(_[a-z0-9_]*)|(__[a-zA-Z][a-zA-Z0-9_]+__))$" --variable-rgx="[a-zA-Z_][a-zA-Z0-9_]{1,30}$" --reports=y --score=y  --output-format=colorized  \{\} +
93
94 [testenv:pre-commit-install]
95 basepython = python3
96 deps = pre-commit
97 commands =
98     pre-commit install
99     pre-commit install --hook-type commit-msg
100
101 [testenv:pre-commit-uninstall]
102 basepython = python3
103 deps = pre-commit
104 commands =
105     pre-commit uninstall
106     pre-commit uninstall --hook-type commit-msg
107
108 [testenv:pre-commit]
109 basepython = python3
110 deps = pre-commit
111 passenv = HOME
112 commands =
113     pre-commit run --all-files --show-diff-on-failure
114     pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
115     # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage.
116     # Its default arguments --passed and --msg-filename are different from CI recommandations.
117     # As a result, the line above is always skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file.
118     # A dedicated gitlint profile for CI is proposed above. Also to behave fine locally, this profile must have access
119     # to the HOME variable so that Gitlint can retrieve Git user settings.
120
121 [testenv:pre-commit-autoupdate]
122 basepython = python3
123 deps = pre-commit
124 commands =
125     pre-commit autoupdate