5e3a907e88fbb6da18f80df0989213980d9b6645
[functest-kubernetes.git] / tox.ini
1 [tox]
2 envlist = pep8,pylint,yamllint,ansiblelint,bashate,py27,py36,bandit,perm
3
4 [testenv]
5 usedevelop = True
6 deps =
7   -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=stable/hunter
8   -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/rocky/upper-constraints.txt}
9   -r{toxinidir}/requirements.txt
10   -r{toxinidir}/test-requirements.txt
11 install_command = pip install {opts} {packages}
12 commands = nosetests --with-xunit \
13   --with-coverage \
14   --cover-tests \
15   --cover-package=functest_kubernetes \
16   --cover-xml \
17   --cover-html \
18   functest_kubernetes
19
20 [testenv:pep8]
21 basepython = python2.7
22 commands = flake8
23
24 [testenv:pylint]
25 basepython = python2.7
26 commands = pylint --disable=locally-disabled,super-on-old-class --reports=n functest_kubernetes
27
28 [testenv:yamllint]
29 basepython = python2.7
30 files =
31   .travis.yml
32   docker
33 commands =
34   yamllint {[testenv:yamllint]files}
35
36 [testenv:ansiblelint]
37 basepython = python2.7
38 commands = ansible-lint -x303 ansible/site.yml
39
40 [testenv:bandit]
41 basepython = python2.7
42 commands = bandit -r functest_kubernetes -x tests -n 5 -ll
43
44 [testenv:py36]
45 commands = nosetests functest_kubernetes
46
47 [testenv:bashate]
48 basepython = python2.7
49 files =
50   build.sh
51 commands = bashate -e E005,E006,E042,E043 {[testenv:bashate]files}
52
53 [testenv:perm]
54 basepython = python2.7
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"