diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-10-21 08:55:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 08:55:32 +0300 |
commit | 63ebe693174a4e6ec314e48d12fcdf3f8401eec6 (patch) | |
tree | e1cc497709a49bf6b448cfe8d9fed971f2036f80 /tox.ini | |
parent | e60d97e6f428f4c536324922ebbe7efcd2440b83 (diff) | |
download | redis-py-63ebe693174a4e6ec314e48d12fcdf3f8401eec6.tar.gz |
tox integrations with invoke and docker (#1632)
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 138 |
1 files changed, 108 insertions, 30 deletions
@@ -2,50 +2,128 @@ addopts = -s [tox] -minversion = 2.4 -envlist = {py35,py36,py37,py38,py39,pypy3}-{plain,hiredis}, flake8, covreport, codecov +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 = - coverage - pytest >= 2.7.0 +deps = -r {toxinidir}/dev_requirements.txt +docker = + master + replica + sentinel_1 + sentinel_2 + sentinel_3 + redismod extras = hiredis: hiredis commands = - {envpython} -b -m coverage run -p -m pytest -W always {posargs} - {envpython} -b -m coverage combine --append + 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] -basepython = python3.6 -deps = flake8 +deps_files = dev_requirements.txt commands = flake8 skipsdist = true skip_install = true -[testenv:pypy-plain] -basepython = pypy - -[testenv:pypy-hiredis] -basepython = pypy - [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 +#[testenv:codecov] +#deps = codecov +#commands = codecov +#passenv = +# REDIS_* +# CI +# CI_* +# CODECOV_* +# SHIPPABLE +# GITHUB_* +# VCS_* +# +#[testenv:covreport] +#deps = coverage +#commands = coverage report |