Protect vs Bucket containing html chars
[functest-xtesting.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,bashate,py27,py38,cover,perm
3 skipsdist = True
4
5 [testenv]
6 pip_version = pip==20.2.4
7 usedevelop = True
8 deps =
9   -c{toxinidir}/upper-constraints.txt
10   -chttps://opendev.org/openstack/requirements/raw/branch/stable/ussuri/upper-constraints.txt
11   -r{toxinidir}/requirements.txt
12   -r{toxinidir}/test-requirements.txt
13 install_command = pip install {opts} {packages}
14 commands = nosetests --with-xunit \
15   --with-coverage \
16   --cover-tests \
17   --cover-package=xtesting \
18   --cover-xml \
19   --cover-html \
20   xtesting/tests/unit
21
22 [testenv:docs]
23 basepython = python3.8
24 commands =
25   doc8 README.rst api --ignore-path api/build
26   sphinx-build -W -b html api/ api/build
27
28 [testenv:pep8]
29 basepython = python3.8
30 commands = flake8
31
32 [testenv:pylint]
33 basepython = python3.8
34 whitelist_externals = bash
35 commands =
36   pylint --min-similarity-lines=10 \
37     --disable=locally-disabled --ignore-imports=y --reports=n --extension-pkg-whitelist=lxml xtesting
38
39 [testenv:yamllint]
40 basepython = python3.8
41 files =
42   .travis.yml
43   ansible
44   xtesting/ci
45 commands =
46   yamllint -s {[testenv:yamllint]files}
47
48 [testenv:py38]
49 commands = nosetests xtesting/tests/unit
50
51 [testenv:bashate]
52 basepython = python3.8
53 files =
54   build.sh
55 commands = bashate {[testenv:bashate]files}
56
57 [testenv:bandit]
58 basepython = python3.8
59 commands = bandit -r xtesting -x tests -n 5 -ll -s B602
60
61 [testenv:cover]
62 basepython = python3.8
63 dirs =
64   xtesting/tests/unit/ci
65   xtesting/tests/unit/core
66   xtesting/tests/unit/utils/test_decorators.py
67 commands = nosetests --with-coverage --cover-tests \
68   --cover-package xtesting.core \
69   --cover-package xtesting.tests.unit \
70   --cover-package xtesting.utils.decorators \
71   --cover-min-percentage 100 {[testenv:cover]dirs}
72
73 [testenv:perm]
74 basepython = python3.8
75 whitelist_externals = bash
76 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/reveal.js/*'
77 commands =
78   bash -c "\
79     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
80     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
81   bash -c "\
82     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"