69 lines
1.8 KiB
INI
69 lines
1.8 KiB
INI
[tox]
|
|
minversion = 3.1
|
|
envlist = pep8,py27,py37,docs,api-ref
|
|
skipsdist = True
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
setenv =
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs}
|
|
|
|
[testenv:genconfig]
|
|
commands = oslo-config-generator --config-file=etc/ec2api/ec2api-config-generator.conf
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref and Docs to docs.openstack.org.
|
|
whitelist_externals = rm
|
|
deps =
|
|
{[testenv]deps}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
|
|
|
[testenv:api-ref]
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref to docs.openstack.org.
|
|
whitelist_externals = rm
|
|
deps = {[testenv:docs]deps}
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
[flake8]
|
|
# E712 is ignored on purpose, since it is normal to use 'column == true'
|
|
# in sqlalchemy.
|
|
# TODO Hacking 0.6 checks to fix
|
|
# H102 Apache 2.0 license header not found
|
|
ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H303,H404,F403,F811,F841
|
|
# H106: Don't put vim configuration in source files
|
|
# H203: Use assertIs(Not)None to check for None
|
|
enable-extensions=H106,H203
|
|
exclude = .venv,.git,.tox,dist,envname,*lib/python*,*egg,build,tools
|
|
max-complexity=25
|
|
|
|
[hacking]
|
|
local-check-factory = ec2api.hacking.checks.factory
|
|
|
|
[testenv:lower-constraints]
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|