diff options
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -1,15 +1,14 @@ [tox] -envlist = docs,pep8,pylint,yamllint,bashate,bandit,py310,cover,perm +envlist = docs,pep8,pylint,yamllint,bashate,bandit,py310,cover,perm,pre-commit [testenv] -pip_version = pip==20.2.4 usedevelop = True deps = -c{toxinidir}/upper-constraints.txt -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -install_command = pip install {opts} {packages} +install_command = pip install --use-deprecated=legacy-resolver {opts} {packages} commands = pytest \ --junit-xml=junit.xml \ @@ -84,11 +83,16 @@ commands = [testenv:perm] basepython = python3.10 -whitelist_externals = bash -path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*' +allowlist_externals = sh +path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*' -not -path './elements/functest/install.d/*' commands = - bash -c "\ + sh -c "\ find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \ -exec ls -l \{\} + | grep '.' && exit 1 || exit 0" - bash -c "\ + sh -c "\ find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0" + +[testenv:pre-commit] +basepython = python3.10 +commands = + pre-commit run --all-files --show-diff-on-failure |