storlets/tox.ini
Kota Tsuyuzaki 147b2924ba Add releasenotes env for releasenote job
Change-Id: Ibc03346c00ca9f52db00be1053adc77ec7ddd33a
2018-02-13 19:12:48 +09:00

96 lines
2.6 KiB
INI

[tox]
minversion = 1.6
envlist = py27,py35,pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONPATH={toxinidir}/StorletSamples/python:{envdir}
NOSE_WITH_COVERAGE=1
NOSE_COVER_BRANCHES=1
deps =
-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
python setup.py testr --slowest --testr-args='--concurrency 1 {posargs:tests.unit}'
whitelist_externals = bash
find
rm
[testenv:pep8python]
commands =
flake8
flake8 --filename=* bin --exclude=bin/*.sh
[testenv:py34]
commands =
nosetests -v \
tests/unit/gateway
[testenv:py35]
commands = {[testenv:py34]commands}
[testenv:func]
basepython = python2.7
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 = {toxinidir}/.functests jenkins
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs]
basepython = python2.7
commands = python setup.py build_sphinx
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:bashate]
# 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
ignore = E123,E125,H301,H306,H404,H405
show-source = True
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
[testenv:pep8]
basepython = python2.7
commands =
{[testenv:pep8python]commands}
{[testenv:bashate]commands}
passenv =
HOME
[testenv:releasenotes]
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html