2 envlist = docs,pep8,pylint,yamllint,ansiblelint,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 basepython = python3.9
51 ansible-lint -xcommand-instead-of-module,command-instead-of-shell,risky-shell-pipe ansible/site.yml
54 commands = nosetests xtesting/tests/unit
57 basepython = python3.9
60 commands = bashate {[testenv:bashate]files}
63 basepython = python3.9
64 commands = bandit -r xtesting -x tests -n 5 -ll -s B602
67 basepython = python3.9
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}
79 basepython = python3.9
80 whitelist_externals = bash
81 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/reveal.js/*'
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"
87 find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"