test: add real-Redis integration tests (#45)

This commit is contained in:
d3vyce
2026-06-02 19:18:32 +02:00
committed by GitHub
parent f9d326ba02
commit 56be33d5b5
6 changed files with 193 additions and 56 deletions
+38 -2
View File
@@ -73,8 +73,8 @@ jobs:
- name: Install dependencies
run: uv sync --group dev
- name: Run tests with coverage
run: uv run pytest --cov --cov-report=xml --cov-report=term-missing --junitxml=junit.xml -o junit_family=legacy
- name: Run unit tests with coverage
run: uv run pytest -m "not integration" --cov --cov-report=xml --cov-report=term-missing --junitxml=junit.xml -o junit_family=legacy
- name: Upload coverage to Codecov
if: matrix.python-version == '3.14'
@@ -91,3 +91,39 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results
test-integration:
name: Integration (${{ matrix.backend.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend:
- { name: redis, image: "redis:7" }
- { name: valkey, image: "valkey/valkey:8" }
services:
store:
image: ${{ matrix.backend.image }}
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 5
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
run: uv python install 3.13
- name: Install dependencies
run: uv sync --group dev
- name: Run integration tests
run: uv run pytest -m integration -v