99 lines
2.7 KiB
INI
99 lines
2.7 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py35,py34,py27,pep8,py27dj18
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command =
|
|
{toxinidir}/tools/pip_install.sh unconstrained {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
whitelist_externals = /bin/bash
|
|
commands =
|
|
# Try to detect whether a limited test suite is being specified and if so
|
|
# direct the testing to that suite's project; otherwise run the full suite
|
|
bash -c 'project=`echo {posargs} | cut -d. -f1`; \
|
|
if [ -z "$project" ]; then \
|
|
EXIT_STATUS=0; \
|
|
{envpython} {toxinidir}/manage.py test craton_dashboard --settings=craton_dashboard.test.settings {posargs} || EXIT_STATUS=$?; \
|
|
exit $EXIT_STATUS; \
|
|
else \
|
|
{envpython} {toxinidir}/manage.py test {posargs} --settings=$project.test.settings --exclude-dir=craton_dashboard/test/integration_tests; \
|
|
fi'
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHONUNBUFFERED=1
|
|
|
|
[testenv:py34]
|
|
basepython = python3.4
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHONUNBUFFERED=1
|
|
|
|
[testenv:py35]
|
|
basepython = python3.5
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHONUNBUFFERED=1
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
# Django-1.8 is LTS
|
|
[testenv:py27dj18]
|
|
basepython = python2.7
|
|
commands = pip install django>=1.8,<1.9
|
|
/bin/bash run_tests.sh -N --no-pep8 {posargs}
|
|
|
|
[testenv:py27dj19]
|
|
basepython = python2.7
|
|
commands = pip install django>=1.9,<1.10
|
|
/bin/bash run_tests.sh -N --no-pep8 {posargs}
|
|
|
|
[testenv:py27dj110]
|
|
basepython = python2.7
|
|
commands = pip install django --pre --upgrade
|
|
/bin/bash run_tests.sh -N --no-pep8 {posargs}
|
|
|
|
[testenv:npm]
|
|
commands =
|
|
nodeenv -p
|
|
npm install
|
|
npm run {posargs:test}
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:cover]
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
show-source = True
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
ignore = E123,E125,H405
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools,node_modules
|
|
|
|
[testenv:bindep]
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files.
|
|
deps = bindep
|
|
commands = bindep test |