... because most of the checks do not require tooz installed. Note that changelog is removed from doc, to be replaced by release notes published at https://docs.openstack.org/releasenotes/tooz/ . Change-Id: I851e17c739f8000885404cbf2bfaa7d241f0b247 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
78 lines
2.4 KiB
INI
78 lines
2.4 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
envlist = py3,py{39,312}-{zookeeper,redis,sentinel,memcached,postgresql,mysql,consul,etcd,etcd3gw,kubernetes},pep8
|
|
|
|
[testenv]
|
|
# We need to install a bit more than just `test-requirements' because those drivers have
|
|
# custom tests that we always run
|
|
deps = .[zake,ipc,memcached,mysql,etcd,etcd3gw,kubernetes]
|
|
zookeeper: .[zookeeper]
|
|
redis: .[redis]
|
|
sentinel: .[redis]
|
|
memcached: .[memcached]
|
|
postgresql: .[postgresql]
|
|
mysql: .[mysql]
|
|
etcd: .[etcd]
|
|
etcd3gw: .[etcd3gw]
|
|
consul: .[consul]
|
|
kubernetes: .[kubernetes]
|
|
-r{toxinidir}/test-requirements.txt
|
|
setenv =
|
|
TOOZ_TEST_URLS = file:///tmp zake:// ipc://
|
|
zookeeper: TOOZ_TEST_DRIVERS = zookeeper
|
|
redis: TOOZ_TEST_DRIVERS = redis
|
|
sentinel: TOOZ_TEST_DRIVERS = redis --sentinel
|
|
sentinel: TOOZ_TEST_SENTINEL = 1
|
|
memcached: TOOZ_TEST_DRIVERS = memcached
|
|
mysql: TOOZ_TEST_DRIVERS = mysql
|
|
postgresql: TOOZ_TEST_DRIVERS = postgresql
|
|
etcd: TOOZ_TEST_DRIVERS = etcd,etcd --cluster
|
|
etcd3gw: TOOZ_TEST_DRIVERS = etcd
|
|
etcd3gw: TOOZ_TEST_ETCD3GW = 1
|
|
consul: TOOZ_TEST_DRIVERS = consul
|
|
kubernetes: TOOZ_TEST_DRIVERS = kubernetes
|
|
allowlist_externals =
|
|
{toxinidir}/run-tests.sh
|
|
{toxinidir}/run-examples.sh
|
|
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
|
|
commands =
|
|
{toxinidir}/run-tests.sh stestr run "{posargs}"
|
|
{toxinidir}/run-examples.sh
|
|
|
|
[testenv:venv]
|
|
# This target is used by the gate go run Sphinx to build the doc
|
|
deps = {[testenv:docs]deps}
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
deps = {[testenv]deps}
|
|
setenv = {[testenv]setenv}
|
|
PYTHON=coverage run --source tooz --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
{toxinidir}/run-tests.sh stestr run "{posargs}"
|
|
{toxinidir}/run-examples.sh
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report --show-missing
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:pep8]
|
|
skip_install = true
|
|
deps =
|
|
pre-commit
|
|
commands =
|
|
pre-commit run --all-files --show-diff-on-failure
|
|
|
|
[flake8]
|
|
exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,doc
|
|
show-source = True
|
|
|
|
[testenv:releasenotes]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|