Skip to content

Commit 73aa9d7

Browse files
committed
Adds Redis test container support and updates dependencies
Enables automated Redis container management during test runs to improve test isolation and reliability. Updates several Python dependencies for security and compatibility, including removal of unnecessary packages and minor version bumps.
1 parent 8d96356 commit 73aa9d7

File tree

2 files changed

+103
-107
lines changed

2 files changed

+103
-107
lines changed

Makefile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all clean test
1+
.PHONY: all clean test redis-up redis-down
22

33
# Default target
44
all: clean test
@@ -12,10 +12,16 @@ clean:
1212
rm -rf dist build *.egg-info
1313

1414
# Run tests — prefers pytest, falls back to python modules
15-
test:
16-
@if python -c "import pytest" 2>/dev/null; then \
17-
python -m pytest -q; \
18-
else \
19-
echo 'pytest not installed — running direct test modules'; \
20-
python -m tests.test_routes; \
21-
fi
15+
test: redis-up
16+
@status=0; \
17+
uv run pytest tests || uv run python -m unittest discover -s tests || status=$$?; \
18+
$(MAKE) redis-down; \
19+
exit $$status
20+
21+
# Start Redis container
22+
redis-up:
23+
docker compose up -d redis
24+
25+
# Stop Redis container
26+
redis-down:
27+
docker compose down

0 commit comments

Comments
 (0)