2 envlist = docs,pep8,pylint,yamllint,bashate,py310,cover,perm,pre-commit
8 -c{toxinidir}/upper-constraints.txt
9 -chttps://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt
10 -r{toxinidir}/requirements.txt
11 -r{toxinidir}/test-requirements.txt
12 install_command = pip install {opts} {packages}
15 --junit-xml=junit.xml \
16 --html=report.html --self-contained-html \
17 --cov=xtesting --cov-reset --cov-report html \
21 basepython = python3.10
23 doc8 README.rst api --ignore-path api/build
24 sphinx-build -W -b html api/ api/build
27 basepython = python3.10
31 basepython = python3.10
32 allowlist_externals = bash
34 pylint --min-similarity-lines=10 \
35 --disable=locally-disabled --ignore-imports=y --reports=n --extension-pkg-whitelist=lxml xtesting
38 basepython = python3.10
44 yamllint -s {[testenv:yamllint]files}
47 basepython = python3.10
50 commands = bashate {[testenv:bashate]files}
53 basepython = python3.10
54 commands = bandit -r xtesting -x tests -n 5 -ll -s B602
57 basepython = python3.10
59 xtesting/tests/unit/ci
60 xtesting/tests/unit/core
61 xtesting/tests/unit/utils/test_decorators.py
63 pytest --cov=xtesting --cov-reset --cov-report html --cov-fail-under=100 \
67 basepython = python3.10
68 allowlist_externals = bash
69 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/reveal.js/*' -not -path './elements/xtesting/install.d/*'
72 find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
73 -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
75 find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"
78 basepython = python3.10
80 pre-commit run --all-files --show-diff-on-failure