2 envlist = docs,pep8,pylint,yamllint,bashate,py39,cover,perm
6 pip_version = pip==20.2.4
9 -c{toxinidir}/upper-constraints.txt
10 -chttps://opendev.org/openstack/requirements/raw/branch/master/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 \
17 --cover-package=xtesting \
23 basepython = python3.9
25 doc8 README.rst api --ignore-path api/build
26 sphinx-build -W -b html api/ api/build
29 basepython = python3.9
33 basepython = python3.9
34 whitelist_externals = bash
36 pylint --min-similarity-lines=10 \
37 --disable=locally-disabled --ignore-imports=y --reports=n --extension-pkg-whitelist=lxml xtesting
40 basepython = python3.9
46 yamllint -s {[testenv:yamllint]files}
49 commands = nosetests xtesting/tests/unit
52 basepython = python3.9
55 commands = bashate {[testenv:bashate]files}
58 basepython = python3.9
59 commands = bandit -r xtesting -x tests -n 5 -ll -s B602
62 basepython = python3.9
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}
74 basepython = python3.9
75 whitelist_externals = bash
76 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/reveal.js/*'
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"
82 find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"