summaryrefslogtreecommitdiff
path: root/tox.ini
blob: dfaccb8a35405e87079c044018bf0edd04932ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
[tox]
minversion = 1.8
envlist = py27,py35,py{27,35}-{zookeeper,redis,sentinel,memcached,postgresql,mysql,consul,etcd,etcd3,etcd3gw},pep8

[testenv]
# We need to install a bit more than just `test' because those drivers have
# custom tests that we always run
deps = .[test,zake,ipc,memcached,mysql,etcd,etcd3,etcd3gw]
    zookeeper: .[zookeeper]
    redis: .[redis]
    sentinel: .[redis]
    memcached: .[memcached]
    postgresql: .[postgresql]
    mysql: .[mysql]
    etcd: .[etcd]
    etcd3: .[etcd3]
    etcd3gw: .[etcd3gw]
    consul: .[consul]
setenv =
    TOOZ_TEST_URLS = file:///tmp zake:// ipc://
    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
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
commands =
    {toxinidir}/run-tests.sh {toxinidir}/tools/pretty_tox.sh "{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]
commands = python setup.py testr --slowest --coverage --testr-args="{posargs}"

[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html

[testenv:pep8]
deps = hacking<0.13,>=0.12
      doc8
commands =
    flake8
    doc8 doc/source

[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