summaryrefslogtreecommitdiff
path: root/tox.ini
blob: bfe937fe9e32eaf83cdcb0241ac790708cec9752 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[pytest]
addopts = -s

[tox]
minversion = 3.2.0
requires = tox-docker
envlist = {py35,py36,py37,py38,py39,pypy3}-{plain,hiredis}, flake8

[docker:master]
name = master
image = redis:6.2-bullseye
ports =
    6379:6379/tcp
healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',6379)) else False"
volumes =
    bind:rw:{toxinidir}/docker/master/redis.conf:/usr/local/etc/redis/redis.conf

[docker:replica]
name = replica
image = redis:6.2-bullseye
links =
    master:master
ports =
    6380:6380/tcp
healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',6380)) else False"
volumes =
    bind:rw:{toxinidir}/docker/replica/redis.conf:/usr/local/etc/redis/redis.conf

[docker:sentinel_1]
name = sentinel_1
image = redis:6.2-bullseye
links =
    master:master
ports =
    26379:26379/tcp
healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26379)) else False"
volumes =
    bind:rw:{toxinidir}/docker/sentinel_1/sentinel.conf:/usr/local/etc/redis/sentinel.conf

[docker:sentinel_2]
name = sentinel_2
image = redis:6.2-bullseye
links =
    master:master
ports =
    26380:26380/tcp
healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26380)) else False"
volumes =
    bind:rw:{toxinidir}/docker/sentinel_2/sentinel.conf:/usr/local/etc/redis/sentinel.conf

[docker:sentinel_3]
name = sentinel_3
image = redis:6.2-bullseye
links =
    master:master
ports =
    26381:26381/tcp
healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26381)) else False"
volumes =
    bind:rw:{toxinidir}/docker/sentinel_3/sentinel.conf:/usr/local/etc/redis/sentinel.conf

[docker:redismod]
name = redismod
image = redislabs/redismod:edge
ports =
    16379:16379/tcp
healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',16379)) else False"

[docker:lots-of-pythons]
name = lots-of-pythons
image = redisfab/lots-of-pythons
volumes =
    bind:rw:{toxinidir}:/data

[testenv]
deps = -r {toxinidir}/dev_requirements.txt
docker =
    master
    replica
    sentinel_1
    sentinel_2
    sentinel_3
    redismod
extras =
    hiredis: hiredis
commands =
    pytest -W always {posargs}

[testenv:devenv]
skipsdist = true
skip_install = true
deps = -r {toxinidir}/dev_requirements.txt
docker =
    master
    replica
    sentinel_1
    sentinel_2
    sentinel_3
    redismod
    lots-of-pythons
commands = echo

[testenv:flake8]
deps_files = dev_requirements.txt
commands = flake8
skipsdist = true
skip_install = true

[testenv:pypy3-plain]
basepython = pypy3

[testenv:pypy3-hiredis]
basepython = pypy3

#[testenv:codecov]
#deps = codecov
#commands = codecov
#passenv =
#  REDIS_*
#  CI
#  CI_*
#  CODECOV_*
#  SHIPPABLE
#  GITHUB_*
#  VCS_*
#
#[testenv:covreport]
#deps = coverage
#commands = coverage report