Skip to content

Commit

Permalink
Expand CI matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
alisaifee committed Dec 5, 2024
1 parent 9e426c1 commit 397891b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ jobs:
redis-version: 7.0
test_params: "-m valkey"
label: "Valkey"
- python-version: "3.12"
redis-version: 8.0
test_params: "-m valkey"
label: "Valkey"
- python-version: "3.12"
redis-version: 7.0
test_params: "-m redict"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ jobs:
redis-version: "7.0"
test_params: "-m valkey"
label: "Valkey"
- python-version: "3.12"
redis-version: "8.0"
test_params: "-m valkey"
label: "Valkey"
- python-version: "3.12"
redis-version: "7.0"
test_params: "-m redict"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,11 @@ services:
memlock: -1
valkey:
image: "valkey/valkey:${VALKEY_VERSION:-unstable}"
command: redis-server --port 6379 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes
ports:
- '12379:6379'
redict:
image: "registry.redict.io/redict:${REDICT_VERSION:-latest}"
command: redict-server --port 6379 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes
ports:
- '13379:6379'
39 changes: 23 additions & 16 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@
PY_VERSION = version.Version(platform.python_version())
DOCKER_TAG_MAPPING = {
"6.2": {
"default": "6.2.6",
"default": "6.2.16",
"stack": "6.2.6-v9",
},
"7.0": {"default": "7.0.12", "stack": "7.0.6-RC9"},
"7.2": {"default": "7.2.0", "stack": "7.2.0-v0"},
"7.0": {"default": "7", "stack": "7.0.6-RC9"},
"7.2": {"default": "7.2", "stack": "7.2.0-v13"},
"7.4": {"default": "7.4", "stack": "7.4.0-v1"},
"8.0": {"default": "latest", "valkey": "8"},
"latest": {"default": "latest", "stack": "latest"},
"next": {
"stack": "edge",
"default": "latest",
"stack": "edge",
},
}

Expand Down Expand Up @@ -330,18 +332,23 @@ def host_ip_env(host_ip):
def docker_tags():
redis_server_version = os.environ.get("COREDIS_REDIS_VERSION", "latest")
mapping = DOCKER_TAG_MAPPING.get(redis_server_version, {"default": "latest"})
os.environ.setdefault(
"REDIS_VERSION", mapping.get("standalone", mapping.get("default"))
)
os.environ.setdefault(
"REDIS_SENTINEL_VERSION", mapping.get("sentinel", mapping.get("default"))
)
os.environ.setdefault(
"REDIS_SSL_VERSION", mapping.get("ssl", mapping.get("default"))
)
os.environ.setdefault(
"REDIS_STACK_VERSION", mapping.get("stack", mapping.get("default"))
)

for env, key in {
"REDIS_VERSION": "standalone",
"REDIS_SENTINEL_VERSION": "sentinel",
"REDIS_SSL_VERSION": "ssl",
"REDIS_STACK_VERSION": "stack",
"KEYDB_VERSION": "keydb",
"DRAGONFLY_VERSION": "dragonfly",
"VALKEY_VERSION": "valkey",
"REDICT_VERSION": "valkey",
}.items():
try:
os.environ.setdefault(env, mapping.get(key, mapping.get("default")))
except:
import pdb

pdb.set_trace()

args = SERVER_DEFAULT_ARGS.get(redis_server_version, None)

Expand Down

0 comments on commit 397891b

Please sign in to comment.