Allow building Functest Kubernetes Virtual Machines
[functest-kubernetes.git] / tox.ini
1 [tox]
2 envlist = pep8,pylint,yamllint,bashate,py39,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?h=stable/xena
9   -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/xena/upper-constraints.txt}
10   -r{toxinidir}/requirements.txt
11   -r{toxinidir}/test-requirements.txt
12 install_command = pip install {opts} {packages}
13 commands = nosetests --with-xunit \
14   --with-coverage \
15   --cover-tests \
16   --cover-package=functest_kubernetes \
17   --cover-xml \
18   --cover-html \
19   functest_kubernetes
20
21 [testenv:pep8]
22 basepython = python3.9
23 commands = flake8
24
25 [testenv:pylint]
26 basepython = python3.9
27 commands = pylint \
28     --ignore-imports=y --min-similarity-lines=10 \
29     --disable=locally-disabled,wrong-import-order --reports=n functest_kubernetes
30
31 [testenv:yamllint]
32 basepython = python3.9
33 files =
34   .travis.yml
35   docker
36 commands =
37   yamllint {[testenv:yamllint]files}
38
39 [testenv:bandit]
40 basepython = python3.9
41 commands = bandit -r functest_kubernetes -x tests -n 5 -ll
42
43 [testenv:py37]
44 commands = nosetests functest_kubernetes
45
46 [testenv:bashate]
47 basepython = python3.9
48 files =
49   build.sh
50   functest_kubernetes/ci/download_images.sh
51 commands = bashate -e E005,E006,E042,E043 {[testenv:bashate]files}
52
53 [testenv:perm]
54 basepython = python3.9
55 whitelist_externals = bash
56 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/pres/reveal.js/*'
57 commands =
58   bash -c "\
59     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
60     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
61   bash -c "\
62     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"