[COMMON] Remove hostPath entries
[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://releases.openstack.org/constraints/upper/yoga
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://releases.openstack.org/constraints/upper/yoga
28     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
29 allowlist_externals = sudo
30 commands =
31     sudo apt install graphviz
32     sphinx-build -q -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
33
34 [testenv:docs-linkcheck]
35 basepython = python3.8
36 deps =
37     -r{toxinidir}/requirements.txt
38     -chttps://releases.openstack.org/constraints/upper/yoga
39     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
40 allowlist_externals = sudo
41 commands =
42     sudo apt install graphviz
43     sphinx-build -q -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
44
45 [testenv:spelling]
46 basepython = python3.8
47 allowlist_externals =
48     wget
49     sudo
50 deps =
51     -r{toxinidir}/requirements.txt
52     -chttps://releases.openstack.org/constraints/upper/yoga
53     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
54 changedir={toxinidir}/docs
55 commands =
56     sudo apt install graphviz
57     wget -nv https://git.onap.org/doc/plain/docs/spelling_wordlist.txt -O spelling_wordlist.txt
58     sphinx-build -b spelling -d {envtmpdir}/doctrees . _build/spelling
59
60 [testenv:gitlint]
61 basepython = python3.8
62 deps =
63     -r{toxinidir}/requirements.txt
64     -chttps://releases.openstack.org/constraints/upper/yoga
65     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
66 commands =
67   gitlint
68
69 [testenv:checkbashisms]
70 deps =
71 allowlist_externals =
72     {toxinidir}/.ci/check-bashisms.sh
73 commands =
74     {toxinidir}/.ci/check-bashisms.sh
75
76 [testenv:shellcheck]
77 basepython = python3
78 deps = shellcheck-py
79 allowlist_externals = find
80 commands =
81     find . -not -path '*/\.*' -name *.sh -exec shellcheck \{\} +
82
83 [testenv:autopep8]
84 basepython = python3.8
85 deps =
86     -r{toxinidir}/requirements.txt
87     -chttps://releases.openstack.org/constraints/upper/yoga
88     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
89 commands =
90     autopep8 --max-line-length 120 --in-place --recursive kubernetes/ TOSCA/ docs/
91
92 [testenv:pylint]
93 basepython = python3.8
94 deps =
95     -r{toxinidir}/requirements.txt
96     -chttps://releases.openstack.org/constraints/upper/yoga
97     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
98 allowlist_externals = find
99 commands =
100     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  \{\} +
101
102 [testenv:pre-commit-install]
103 basepython = python3
104 deps = pre-commit
105 commands =
106     pre-commit install
107     pre-commit install --hook-type commit-msg
108
109 [testenv:pre-commit-uninstall]
110 basepython = python3
111 deps = pre-commit
112 commands =
113     pre-commit uninstall
114     pre-commit uninstall --hook-type commit-msg
115
116 [testenv:pre-commit]
117 basepython = python3
118 deps = pre-commit
119 passenv = HOME
120 commands =
121     pre-commit run --all-files --show-diff-on-failure
122     pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
123     # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage.
124     # Its default arguments --passed and --msg-filename are different from CI recommandations.
125     # As a result, the line above is always skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file.
126     # A dedicated gitlint profile for CI is proposed above. Also to behave fine locally, this profile must have access
127     # to the HOME variable so that Gitlint can retrieve Git user settings.
128
129 [testenv:pre-commit-autoupdate]
130 basepython = python3
131 deps = pre-commit
132 commands =
133     pre-commit autoupdate