Add the missing action
[functest-xtesting.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,ansiblelint,bashate,py27,py36,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/stein/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.6
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.6
30 commands = flake8
31
32 [testenv:pylint]
33 basepython = python3.6
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.6
41 files =
42   .travis.yml
43   ansible
44   xtesting/ci
45 commands =
46   yamllint -s {[testenv:yamllint]files}
47
48 [testenv:ansiblelint]
49 basepython = python3.6
50 commands =
51   ansible-lint -x303 ansible/site.yml
52
53 [testenv:py36]
54 commands = nosetests xtesting/tests/unit
55
56 [testenv:bashate]
57 basepython = python3.6
58 files =
59   build.sh
60 commands = bashate {[testenv:bashate]files}
61
62 [testenv:bandit]
63 basepython = python3.6
64 commands = bandit -r xtesting -x tests -n 5 -ll -s B602
65
66 [testenv:cover]
67 basepython = python3.6
68 dirs =
69   xtesting/tests/unit/ci
70   xtesting/tests/unit/core
71   xtesting/tests/unit/utils/test_decorators.py
72 commands = nosetests --with-coverage --cover-tests \
73   --cover-package xtesting.core \
74   --cover-package xtesting.tests.unit \
75   --cover-package xtesting.utils.decorators \
76   --cover-min-percentage 100 {[testenv:cover]dirs}
77
78 [testenv:perm]
79 basepython = python3.6
80 whitelist_externals = bash
81 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/reveal.js/*'
82 commands =
83   bash -c "\
84     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
85     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
86   bash -c "\
87     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"