blob: 24f9f4b041ec8a9d52b9c8a893dc9fe80e4f1e6c [file] [log] [blame]
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +01001[tox]
Tony Breedsde55ca22016-12-20 15:42:54 +11002minversion = 2.0
sandriichenko5f8208e2018-02-23 14:53:00 +02003envlist = py35,py27,pep8
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +01004skipsdist = True
5
6[testenv]
7usedevelop = True
Andreas Jaeger7cd8d5a2017-12-02 07:11:16 +01008install_command = pip install {opts} {packages}
9deps =
10 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
11 -r{toxinidir}/requirements.txt
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010012 -r{toxinidir}/test-requirements.txt
13setenv =
Tony Breedsde55ca22016-12-20 15:42:54 +110014 VIRTUAL_ENV={envdir}
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010015 PYTHONDONTWRITEBYTECODE=1
16whitelist_externals = sh
17 find
18 rm
19commands =
20 find . -type f -name "*.pyc" -delete
Vu Cong Tuanf348bfe2018-07-12 14:12:34 +070021 stestr run {posargs}
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010022passenv = http_proxy
23 HTTP_PROXY
24 https_proxy
25 HTTPS_PROXY
26 no_proxy
27 NO_PROXY
28 OS_DEBUG
29 OS_LOG_CAPTURE
30 OS_STDERR_CAPTURE
31 OS_STDOUT_CAPTURE
32
33[testenv:pep8]
Doug Hellmannba133292018-09-26 18:50:58 -040034basepython = python3
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010035commands = sh tools/pretty_flake8.sh
36
Graham Hayesc392cf92017-02-23 16:06:04 -050037
38[testenv:docs]
Doug Hellmannba133292018-09-26 18:50:58 -040039basepython = python3
Graham Hayesc392cf92017-02-23 16:06:04 -050040commands = rm -rf doc/build
41 sphinx-build -E -W -b html doc/source doc/build/html
42
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010043[testenv:bashate]
44deps = bashate
45whitelist_externals = bash
46commands = bash -c "find {toxinidir}/devstack \
47 -not \( -type d -name .?\* -prune \) \
48 -not \( -type d -name doc -prune \) \
49 -type f \
50 -not -name \*~ \
51 -not -name \*.md \
52 \( \
53 -name \*.sh -or \
54 -name \*rc -or \
55 -name functions\* -or \
56 -wholename \*/lib/\* \
57 \) \
58 -print0 | xargs -0 bashate -v"
59
60[testenv:pip-check-reqs]
61# do not install test-requirements as that will pollute the virtualenv for
62# determining missing packages
63# this also means that pip-missing-reqs must be installed separately, outside
64# of the requirements.txt files
65deps = pip-check-reqs
66 -r{toxinidir}/requirements.txt
67commands=pip-missing-reqs -d --ignore-file=designate/tests/* designate
68
69[testenv:venv]
Doug Hellmannba133292018-09-26 18:50:58 -040070basepython = python3
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010071commands = {posargs}
72
73[flake8]
74# ignored flake8 codes:
75# H302 import only modules
76# H306 imports not in alphabetical order
77# H402 one line docstring needs punctuation
78# H404 multi line docstring should start with a summary
79# H405 multi line docstring summary not separated with an empty line
80# H904 Wrap long lines in parentheses instead of a backslash
81# E126 continuation line over-indented for hanging indent
82# E128 continuation line under-indented for visual indent
83
84ignore = H302,H306,H402,H404,H405,H904,E126,E128
85exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*openstack/deprecated*,*lib/python*,*egg,build,tools,.ropeproject
Kiall Mac Innesa17f2332016-08-25 13:34:42 +010086
87
88[hacking]
89local-check-factory = designate_tempest_plugin.hacking.checks.factory
90