Install setuptools_scm before xrally
[functest-kubernetes.git] / tox.ini
1 [tox]
2 envlist = pep8,pylint,yamllint,ansiblelint,bashate,py37,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/jerma
9   -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/train/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.7
23 commands = flake8
24
25 [testenv:pylint]
26 basepython = python3.7
27 commands = pylint \
28     --ignore-imports=y --min-similarity-lines=10 \
29     --disable=locally-disabled --reports=n functest_kubernetes
30
31 [testenv:yamllint]
32 basepython = python3.7
33 files =
34   .travis.yml
35   docker
36 commands =
37   yamllint {[testenv:yamllint]files}
38
39 [testenv:ansiblelint]
40 basepython = python3.7
41 commands = ansible-lint -x303 ansible/site.yml
42
43 [testenv:bandit]
44 basepython = python3.7
45 commands = bandit -r functest_kubernetes -x tests -n 5 -ll
46
47 [testenv:py37]
48 commands = nosetests functest_kubernetes
49
50 [testenv:bashate]
51 basepython = python3.7
52 files =
53   build.sh
54   functest_kubernetes/ci/download_images.sh
55 commands = bashate -e E005,E006,E042,E043 {[testenv:bashate]files}
56
57 [testenv:perm]
58 basepython = python3.7
59 whitelist_externals = bash
60 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/pres/reveal.js/*'
61 commands =
62   bash -c "\
63     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
64     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
65   bash -c "\
66     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"