72 lines
2.1 KiB
INI
72 lines
2.1 KiB
INI
[tox]
|
||
minversion = 2.1
|
||
envlist = py{35,27},pep8,docs,api-ref
|
||
skipsdist = True
|
||
|
||
[testenv]
|
||
usedevelop = True
|
||
# tox is silly... these need to be separated by a newline....
|
||
whitelist_externals = bash
|
||
find
|
||
rm
|
||
env
|
||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||
setenv = VIRTUAL_ENV={envdir}
|
||
LANG=en_US.UTF-8
|
||
LANGUAGE=en_US:en
|
||
LC_ALL=C
|
||
deps = -r{toxinidir}/test-requirements.txt
|
||
commands =
|
||
find . -type f -name "*.pyc" -delete
|
||
rm -f .testrepository/times.dbm
|
||
|
||
[testenv:py27]
|
||
commands =
|
||
{[testenv]commands}
|
||
stestr --test-path 'ec2api/tests/unit' run '{posargs}'
|
||
stestr slowest
|
||
|
||
[testenv:py35]
|
||
commands =
|
||
{[testenv]commands}
|
||
stestr --test-path 'ec2api/tests/unit' 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 developer.openstack.org.
|
||
commands = python setup.py build_sphinx
|
||
|
||
[testenv:api-ref]
|
||
# This environment is called from CI scripts to test and publish
|
||
# the API Ref to developer.openstack.org.
|
||
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,ec2api/tests/functional/obsolete
|
||
max-complexity=25
|
||
|
||
[hacking]
|
||
local-check-factory = ec2api.hacking.checks.factory
|