[tox] minversion = 3.2.0 envlist = py27,py37,pep8 skipsdist = True ignore_basepython_conflict = True [testenv] usedevelop = True setenv = VIRTUAL_ENV={envdir} PYTHONPATH={toxinidir}/StorletSamples/python:{envdir} NOSE_WITH_COVERAGE=1 NOSE_COVER_BRANCHES=1 deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt git+git://github.com/openstack/swift.git commands = find . -type f -name "*.py[c|o]" -delete find . -type d -name "__pycache__" -delete stestr run --slowest --concurrency 1 {posargs:tests.unit} whitelist_externals = bash find rm [testenv:pep8python] basepython = python3 commands = flake8 flake8 --filename=* bin --exclude=bin/*.sh [testenv:py27] deps = -c{toxinidir}/py2-constraints.txt -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt git+git://github.com/openstack/swift.git [testenv:py36] basepython = python3.6 commands = nosetests -v tests/unit [testenv:py37] basepython = python3.7 commands = {[testenv:py36]commands} [testenv:func] basepython = python2.7 deps = {[testenv:py27]deps} setenv = VIRTUAL_ENV={envdir} STORLET_SAMPLE_PATH={toxinidir}/StorletSamples CLUSTER_CONF_DIR={toxinidir} commands = {toxinidir}/.functests jenkins passenv = USE_PYTHON3 [testenv:func-py3] basepython = python3 deps = -r{toxinidir}/test-requirements.txt git+git://github.com/openstack/swift.git setenv = VIRTUAL_ENV={envdir} STORLET_SAMPLE_PATH={toxinidir}/StorletSamples CLUSTER_CONF_DIR={toxinidir} commands = {[testenv:func]commands} [testenv:venv] basepython = python3 commands = {posargs} [testenv:cover] basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source storlets --parallel-mode commands = stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml [testenv:docs] basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/doc/requirements.txt git+git://github.com/openstack/swift.git commands = sphinx-build -a -W -E -b html doc/source doc/build/html [testenv:debug] basepython = python3 commands = oslo_debug_helper {posargs} [testenv:bashate] basepython = python3 # Run bashate check for all bash scripts # Ignores the following rules: # E003: Indent not multiple of 4 (we prefer to use multiples of 2) # E006: Line longer than 79 columns commands = bash -c "grep --recursive --binary-files=without-match \ --files-with-match '^.!.*\(ba\)\?sh$' \ --exclude-dir .tox \ --exclude-dir .git \ {toxinidir} | xargs bashate --error . --verbose --ignore=E003,E006" [flake8] # E123, E125 skipped as they are invalid PEP-8. # H301: one import per line # H306: imports not in alphabetical order (time, os) # H404: multi line docstring should start without a leading new line # H405: multi line docstring summary not separated with an empty line # W503 line break before binary operator # W504 line break after binary operator ignore = E123,E125,H301,H306,H404,H405,W503,W504 show-source = True builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build [testenv:pep8] basepython = python3 commands = {[testenv:pep8python]commands} {[testenv:bashate]commands} passenv = HOME [testenv:releasenotes] basepython = python3 deps = {[testenv:docs]deps} commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html