Sylvain Desbureaux | 3c393e5 | 2020-12-07 09:15:19 +0100 | [diff] [blame] | 1 | [tox] |
| 2 | minversion = 1.6 |
| 3 | envlist = |
Sylvain Desbureaux | ec07bca | 2020-12-09 10:13:42 +0100 | [diff] [blame] | 4 | docs, |
| 5 | docs-linkcheck, |
Sylvain Desbureaux | 3c393e5 | 2020-12-07 09:15:19 +0100 | [diff] [blame] | 6 | gitlint, |
Guillaume Lambert | 85b1492 | 2021-03-12 13:53:18 +0100 | [diff] [blame] | 7 | checkbashisms, |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame] | 8 | pre-commit, |
Sylvain Desbureaux | 3c393e5 | 2020-12-07 09:15:19 +0100 | [diff] [blame] | 9 | skipsdist=true |
| 10 | |
Sylvain Desbureaux | ec07bca | 2020-12-09 10:13:42 +0100 | [diff] [blame] | 11 | [doc8] |
| 12 | ignore-path-errors=docs/helm-search.txt;D001 |
| 13 | |
| 14 | [testenv:doc8] |
Cédric Ollivier | d242150 | 2021-09-28 16:26:56 +0200 | [diff] [blame] | 15 | deps = |
| 16 | -r{toxinidir}/requirements.txt |
| 17 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt |
| 18 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt |
Sylvain Desbureaux | ec07bca | 2020-12-09 10:13:42 +0100 | [diff] [blame] | 19 | commands = |
guillaume.lambert | f3319a8 | 2021-09-26 21:37:50 +0200 | [diff] [blame] | 20 | - doc8 docs/ |
Sylvain Desbureaux | ec07bca | 2020-12-09 10:13:42 +0100 | [diff] [blame] | 21 | |
| 22 | [testenv:docs] |
Cédric Ollivier | d242150 | 2021-09-28 16:26:56 +0200 | [diff] [blame] | 23 | deps = |
| 24 | -r{toxinidir}/requirements.txt |
| 25 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt |
| 26 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt |
Sylvain Desbureaux | ec07bca | 2020-12-09 10:13:42 +0100 | [diff] [blame] | 27 | commands = |
guillaume.lambert | 91df0d8 | 2021-04-24 10:37:53 +0200 | [diff] [blame] | 28 | sphinx-build -q -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html |
Sylvain Desbureaux | ec07bca | 2020-12-09 10:13:42 +0100 | [diff] [blame] | 29 | |
| 30 | [testenv:docs-linkcheck] |
Cédric Ollivier | d242150 | 2021-09-28 16:26:56 +0200 | [diff] [blame] | 31 | deps = |
| 32 | -r{toxinidir}/requirements.txt |
| 33 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt |
| 34 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt |
guillaume.lambert | 91df0d8 | 2021-04-24 10:37:53 +0200 | [diff] [blame] | 35 | commands = sphinx-build -q -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck |
Sylvain Desbureaux | ec07bca | 2020-12-09 10:13:42 +0100 | [diff] [blame] | 36 | |
Guillaume Lambert | b825e91 | 2021-02-01 21:22:33 +0100 | [diff] [blame] | 37 | [testenv:spelling] |
| 38 | #basepython = python3 |
| 39 | whitelist_externals = wget |
| 40 | deps = |
Cédric Ollivier | d242150 | 2021-09-28 16:26:56 +0200 | [diff] [blame] | 41 | -r{toxinidir}/requirements.txt |
| 42 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt |
| 43 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt |
Guillaume Lambert | b825e91 | 2021-02-01 21:22:33 +0100 | [diff] [blame] | 44 | changedir={toxinidir}/docs |
| 45 | commands = |
Guillaume Lambert | 089ba21 | 2021-02-10 11:48:39 +0100 | [diff] [blame] | 46 | wget -nv https://git.onap.org/doc/plain/docs/spelling_wordlist.txt -O spelling_wordlist.txt |
Guillaume Lambert | b825e91 | 2021-02-01 21:22:33 +0100 | [diff] [blame] | 47 | sphinx-build -b spelling -d {envtmpdir}/doctrees . _build/spelling |
| 48 | |
Sylvain Desbureaux | 3c393e5 | 2020-12-07 09:15:19 +0100 | [diff] [blame] | 49 | [testenv:gitlint] |
| 50 | basepython = python3 |
| 51 | deps = |
Cédric Ollivier | d242150 | 2021-09-28 16:26:56 +0200 | [diff] [blame] | 52 | -r{toxinidir}/requirements.txt |
| 53 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt |
| 54 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt |
Sylvain Desbureaux | 3c393e5 | 2020-12-07 09:15:19 +0100 | [diff] [blame] | 55 | commands = |
| 56 | gitlint |
| 57 | |
Guillaume Lambert | d8eab71 | 2021-03-08 21:49:28 +0100 | [diff] [blame] | 58 | [testenv:checkbashisms] |
| 59 | deps = |
guillaume.lambert | d09f363 | 2021-12-10 21:17:30 +0100 | [diff] [blame] | 60 | whitelist_externals = |
| 61 | {toxinidir}/.ci/check-bashisms.sh |
Guillaume Lambert | d8eab71 | 2021-03-08 21:49:28 +0100 | [diff] [blame] | 62 | commands = |
guillaume.lambert | d09f363 | 2021-12-10 21:17:30 +0100 | [diff] [blame] | 63 | {toxinidir}/.ci/check-bashisms.sh |
Guillaume Lambert | d8eab71 | 2021-03-08 21:49:28 +0100 | [diff] [blame] | 64 | |
guillaume.lambert | 73f3459 | 2021-12-10 20:26:19 +0100 | [diff] [blame] | 65 | [testenv:shellcheck] |
| 66 | basepython = python3 |
| 67 | deps = shellcheck-py |
| 68 | whitelist_externals = find |
| 69 | commands = |
| 70 | find . -not -path '*/\.*' -name *.sh -exec shellcheck \{\} + |
| 71 | |
Guillaume Lambert | 056b2d4 | 2021-02-17 12:09:47 +0100 | [diff] [blame] | 72 | [testenv:autopep8] |
Cédric Ollivier | d242150 | 2021-09-28 16:26:56 +0200 | [diff] [blame] | 73 | deps = |
| 74 | -r{toxinidir}/requirements.txt |
| 75 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt |
| 76 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt |
Guillaume Lambert | 056b2d4 | 2021-02-17 12:09:47 +0100 | [diff] [blame] | 77 | commands = |
| 78 | autopep8 --max-line-length 120 --in-place --recursive kubernetes/ TOSCA/ docs/ |
| 79 | |
| 80 | [testenv:pylint] |
Cédric Ollivier | d242150 | 2021-09-28 16:26:56 +0200 | [diff] [blame] | 81 | deps = |
| 82 | -r{toxinidir}/requirements.txt |
| 83 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt |
| 84 | -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt |
Guillaume Lambert | 056b2d4 | 2021-02-17 12:09:47 +0100 | [diff] [blame] | 85 | whitelist_externals = find |
| 86 | commands = |
| 87 | 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 \{\} + |
| 88 | |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame] | 89 | [testenv:pre-commit-install] |
| 90 | basepython = python3 |
| 91 | deps = pre-commit |
| 92 | commands = |
| 93 | pre-commit install |
| 94 | pre-commit install --hook-type commit-msg |
| 95 | |
| 96 | [testenv:pre-commit-uninstall] |
| 97 | basepython = python3 |
| 98 | deps = pre-commit |
| 99 | commands = |
| 100 | pre-commit uninstall |
| 101 | pre-commit uninstall --hook-type commit-msg |
| 102 | |
| 103 | [testenv:pre-commit] |
| 104 | basepython = python3 |
| 105 | deps = pre-commit |
| 106 | passenv = HOME |
| 107 | commands = |
| 108 | pre-commit run --all-files --show-diff-on-failure |
| 109 | pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG |
| 110 | # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage. |
| 111 | # Its default arguments --passed and --msg-filename are different from CI recommandations. |
| 112 | # As a result, the line above is always skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file. |
| 113 | # A dedicated gitlint profile for CI is proposed above. Also to behave fine locally, this profile must have access |
| 114 | # to the HOME variable so that Gitlint can retrieve Git user settings. |
guillaume.lambert | 296fa7f | 2021-12-10 20:28:24 +0100 | [diff] [blame] | 115 | |
| 116 | [testenv:pre-commit-autoupdate] |
| 117 | basepython = python3 |
| 118 | deps = pre-commit |
| 119 | commands = |
| 120 | pre-commit autoupdate |