k8s.gcr.io -> registry.k8s.io
[functest-kubernetes.git] / tox.ini
1 [tox]
2 envlist = pep8,pylint,yamllint,bashate,py310,bandit,perm
3
4 [testenv]
5 pip_version = pip==20.2.4
6 usedevelop = True
7 deps =
8   -chttps://git.opnfv.org/functest/plain/upper-constraints.txt
9   -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
10   -r{toxinidir}/requirements.txt
11   -r{toxinidir}/test-requirements.txt
12 install_command = pip install --use-deprecated=legacy-resolver {opts} {packages}
13 commands =
14   pytest \
15     --junit-xml=junit.xml \
16     --html=report.html --self-contained-html \
17     --cov=xtesting --cov-reset --cov-report html \
18     functest_kubernetes
19
20 [testenv:pep8]
21 basepython = python3.10
22 commands = flake8
23
24 [testenv:pylint]
25 basepython = python3.10
26 commands = pylint \
27     --ignore-imports=y --min-similarity-lines=10 \
28     --disable=locally-disabled,wrong-import-order --reports=n functest_kubernetes
29
30 [testenv:yamllint]
31 basepython = python3.10
32 files =.travis.yml docker
33 commands =
34   yamllint {[testenv:yamllint]files}
35
36 [testenv:bandit]
37 basepython = python3.10
38 commands = bandit -r functest_kubernetes -x tests -n 5 -ll
39
40 [testenv:bashate]
41 basepython = python3.10
42 files =build.sh functest_kubernetes/ci/download_images.sh
43 commands = bashate -e E005,E006,E042,E043 {[testenv:bashate]files}
44
45 [testenv:perm]
46 basepython = python3.10
47 allowlist_externals = bash
48 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/pres/reveal.js/*' -not -path './elements/functest-kubernetes/install.d/*'
49 commands =
50   bash -c "\
51     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
52     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
53   bash -c "\
54     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"
55
56 [testenv:pre-commit]
57 basepython = python3.10
58 commands =
59     pre-commit run --all-files --show-diff-on-failure