2013-12-06 13:17:29 +01:00
|
|
|
[tox]
|
2019-04-09 10:24:11 +08:00
|
|
|
minversion = 3.1.0
|
2020-02-03 20:30:55 +01:00
|
|
|
envlist = py37,py{36,37}-{zookeeper,redis,sentinel,memcached,postgresql,mysql,consul,etcd,etcd3,etcd3gw},pep8
|
|
|
|
ignore_basepython_conflict = True
|
2013-12-06 13:17:29 +01:00
|
|
|
|
|
|
|
[testenv]
|
2020-02-03 20:30:55 +01:00
|
|
|
basepython = python3
|
2019-05-28 17:30:17 +02:00
|
|
|
# We need to install a bit more than just `test-requirements' because those drivers have
|
2016-05-26 14:39:52 +02:00
|
|
|
# custom tests that we always run
|
2019-05-28 17:30:17 +02:00
|
|
|
deps = .[zake,ipc,memcached,mysql,etcd,etcd3,etcd3gw]
|
2016-09-12 14:09:41 +02:00
|
|
|
zookeeper: .[zookeeper]
|
|
|
|
redis: .[redis]
|
|
|
|
sentinel: .[redis]
|
|
|
|
memcached: .[memcached]
|
|
|
|
postgresql: .[postgresql]
|
|
|
|
mysql: .[mysql]
|
|
|
|
etcd: .[etcd]
|
2017-03-18 13:47:25 -04:00
|
|
|
etcd3: .[etcd3]
|
2017-05-18 16:24:54 -04:00
|
|
|
etcd3gw: .[etcd3gw]
|
2016-09-12 14:09:41 +02:00
|
|
|
consul: .[consul]
|
2019-05-28 17:30:17 +02:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
2017-03-22 14:19:29 +01:00
|
|
|
setenv =
|
|
|
|
TOOZ_TEST_URLS = file:///tmp zake:// ipc://
|
2017-06-08 10:28:22 +02:00
|
|
|
zookeeper: TOOZ_TEST_DRIVERS = zookeeper
|
|
|
|
redis: TOOZ_TEST_DRIVERS = redis
|
|
|
|
sentinel: TOOZ_TEST_DRIVERS = redis --sentinel
|
|
|
|
memcached: TOOZ_TEST_DRIVERS = memcached
|
|
|
|
mysql: TOOZ_TEST_DRIVERS = mysql
|
|
|
|
postgresql: TOOZ_TEST_DRIVERS = postgresql
|
|
|
|
etcd: TOOZ_TEST_DRIVERS = etcd,etcd --cluster
|
|
|
|
etcd3: TOOZ_TEST_DRIVERS = etcd
|
|
|
|
etcd3: TOOZ_TEST_ETCD3 = 1
|
|
|
|
etcd3gw: TOOZ_TEST_DRIVERS = etcd
|
|
|
|
etcd3gw: TOOZ_TEST_ETCD3GW = 1
|
|
|
|
consul: TOOZ_TEST_DRIVERS = consul
|
2016-12-21 13:50:57 +11:00
|
|
|
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
|
2017-03-22 14:19:29 +01:00
|
|
|
commands =
|
2019-09-24 10:25:47 +02:00
|
|
|
{toxinidir}/run-tests.sh stestr run "{posargs}"
|
2017-03-22 14:19:29 +01:00
|
|
|
{toxinidir}/run-examples.sh
|
2013-12-06 13:17:29 +01:00
|
|
|
|
|
|
|
[testenv:venv]
|
2016-05-26 14:39:52 +02:00
|
|
|
# This target is used by the gate go run Sphinx to build the doc
|
2017-07-06 23:43:55 +00:00
|
|
|
deps = {[testenv:docs]deps}
|
2013-12-06 13:17:29 +01:00
|
|
|
commands = {posargs}
|
|
|
|
|
2014-08-19 14:44:36 +02:00
|
|
|
[testenv:cover]
|
2019-04-09 10:24:11 +08:00
|
|
|
deps = {[testenv]deps}
|
|
|
|
setenv = {[testenv]setenv}
|
2018-09-17 18:14:07 +00:00
|
|
|
PYTHON=coverage run --source tooz --parallel-mode
|
|
|
|
commands =
|
2019-09-24 10:25:47 +02:00
|
|
|
{toxinidir}/run-tests.sh stestr run "{posargs}"
|
2018-09-17 18:14:07 +00:00
|
|
|
{toxinidir}/run-examples.sh
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2014-08-19 14:44:36 +02:00
|
|
|
|
2014-08-20 16:45:18 +02:00
|
|
|
[testenv:docs]
|
2017-12-20 12:13:07 +01:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2018-01-08 12:21:46 -06:00
|
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
2014-08-20 16:45:18 +02:00
|
|
|
|
2013-12-06 13:17:29 +01:00
|
|
|
[testenv:pep8]
|
2020-02-03 20:30:55 +01:00
|
|
|
deps = hacking<2.1,>=2.0
|
2016-05-26 14:35:23 +02:00
|
|
|
doc8
|
2013-12-06 13:17:29 +01:00
|
|
|
commands =
|
|
|
|
flake8
|
2016-05-26 14:35:23 +02:00
|
|
|
doc8 doc/source
|
2013-12-06 13:17:29 +01:00
|
|
|
|
|
|
|
[flake8]
|
2014-06-24 17:11:26 +02:00
|
|
|
exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,doc
|
2013-12-06 13:17:29 +01:00
|
|
|
show-source = True
|
2014-10-29 12:27:15 -07:00
|
|
|
|
2016-11-02 14:10:49 +08:00
|
|
|
[testenv:releasenotes]
|
2017-12-20 12:13:07 +01:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2016-11-02 14:10:49 +08:00
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|