Skip to content

Commit 79c4844

Browse files
chrisguidryclaude
andauthored
Add Valkey support to test matrix (#141)
## Summary - Adds Valkey 8.0 to the CI test matrix to verify compatibility alongside Redis 6.2 and 7.4 - Updates test infrastructure to handle both Redis and Valkey Docker images - Maintains full backward compatibility with existing Redis testing ## Changes - **CI Matrix**: Added `valkey-8.0` to test matrix, creating 12 total test combinations - **Test Infrastructure**: Enhanced Docker image selection logic in `conftest.py` to support Valkey images - **Documentation**: Updated requirements to mention Valkey 8.0+ support This closes #139 to test against Valkey as a Redis-compatible alternative. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent f62d09c commit 79c4844

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
python-version: ["3.12", "3.13"]
18-
redis-version: ["6.2", "7.4"]
18+
redis-version: ["6.2", "7.4", "valkey-8.0"]
1919
redis-py-version: [">=4.6,<5", ">=5"]
2020

2121
steps:

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
**Docket** (`pydocket` on PyPI) is a distributed background task system for Python functions with Redis-backed persistence. It enables scheduling both immediate and future work with comprehensive dependency injection, retry mechanisms, and fault tolerance.
88

9-
**Key Requirements**: Python 3.12+, Redis 6.2+
9+
**Key Requirements**: Python 3.12+, Redis 6.2+ or Valkey 8.0+
1010

1111
## Development Commands
1212

tests/conftest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,15 @@ def redis_server(testrun_uid: str, worker_id: str) -> Generator[Container, None,
9090
s.bind(("", 0))
9191
redis_port = s.getsockname()[1]
9292

93+
# Determine Docker image based on version
94+
if REDIS_VERSION.startswith("valkey-"):
95+
version = REDIS_VERSION.replace("valkey-", "")
96+
image = f"valkey/valkey:{version}"
97+
else:
98+
image = f"redis:{REDIS_VERSION}"
99+
93100
container = client.containers.run(
94-
f"redis:{REDIS_VERSION}",
101+
image,
95102
detach=True,
96103
ports={"6379/tcp": redis_port},
97104
labels={

0 commit comments

Comments
 (0)