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