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