[tox] minversion = 2.0 envlist = py27,py37,pypy,pep8 skipsdist = True [testenv] usedevelop = True install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} OS_TEST_PATH=./karbor/tests/unit PYTHONWARNINGS=default::DeprecationWarning LANGUAGE=en_US LC_ALL=en_US.utf-8 deps = -r{toxinidir}/test-requirements.txt whitelist_externals = sh /bin/rm commands = /bin/rm -f .testrepository/times.dbm stestr run {posargs} stestr slowest [testenv:fullstack] basepython = python2.7 setenv = OS_TEST_PATH=./karbor/tests/fullstack OS_TEST_TIMEOUT=3600 commands = oslo-config-generator --config-file etc/oslo-config-generator/karbor.conf --output-file etc/karbor.conf stestr --test-path=./karbor/tests/fullstack run '{posargs}' stestr slowest [testenv:pep8] basepython = python3 commands = flake8 [testenv:venv] basepython = python3 commands = {posargs} [testenv:cover] basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source karbor --parallel-mode commands = stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml coverage report [testenv:docs] basepython = python3 whitelist_externals = sh /bin/rm commands = /bin/rm -rf doc/build /bin/rm -rf doc/source/contributor/api python setup.py build_sphinx [testenv:debug] basepython = python3 commands = oslo_debug_helper -t karbor/tests/unit {posargs} [testenv:api-ref] basepython = python3 # This environment is called from CI scripts to test and publish # the API Ref to docs.openstack.org. whitelist_externals = sh /bin/rm deps = -r{toxinidir}/test-requirements.txt commands = /bin/rm -rf api-ref/build sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html/ [testenv:releasenotes] basepython = python3 commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:genconfig] basepython = python3 commands = oslo-config-generator --config-file etc/oslo-config-generator/karbor.conf [testenv:genpolicy] basepython = python3 commands = oslopolicy-sample-generator --config-file=etc/karbor-policy-generator.conf [flake8] show-source = True ignore = builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes [hacking] import_exceptions = karbor.i18n [testenv:lower-constraints] basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt