Skip to content

Commit 3345eb3

Browse files
author
Nitin Kanukolanu
committed
Update makefile for tests
1 parent 6c9c70b commit 3345eb3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,14 @@ test-all: ## Run all tests including API tests
5858

5959
test-notebooks: ## Run notebook tests
6060
@echo "📓 Running notebook tests"
61-
uv run python -m pytest --nbval-lax ./docs/user_guide -vvv $(ARGS)
61+
@echo "🔍 Checking Redis version..."
62+
@if uv run python -c "import redis; from redisvl.redis.connection import supports_svs; client = redis.Redis.from_url('redis://localhost:6379'); exit(0 if supports_svs(client) else 1)" 2>/dev/null; then \
63+
echo "✅ Redis 8.2.0+ detected - running all notebooks"; \
64+
uv run python -m pytest --nbval-lax ./docs/user_guide -vvv $(ARGS); \
65+
else \
66+
echo "⚠️ Redis < 8.2.0 detected - skipping SVS notebook"; \
67+
uv run python -m pytest --nbval-lax ./docs/user_guide -vvv --ignore=./docs/user_guide/09_svs_vamana.ipynb $(ARGS); \
68+
fi
6269

6370
check: lint test ## Run all checks (lint + test)
6471

0 commit comments

Comments
 (0)