From 4ea1ef0fe5bdf7f5ae105f204861e9698e1c5ed3 Mon Sep 17 00:00:00 2001 From: grillazz Date: Thu, 22 Oct 2026 12:46:06 +0200 Subject: [PATCH] feat: add local test command to Makefile and update README instructions --- Makefile | 5 +++++ README.md | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e738138..f214840 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,11 @@ docker-create-db-migration: ## Create a new alembic database migration. Example # ==================================================================================== # TESTING # ==================================================================================== +.PHONY: test +test: ## Run project tests locally with Compose dependencies + docker compose -f compose.yml up -d --wait postgres redis + POSTGRES_HOST=127.0.0.1 REDIS_HOST=127.0.0.1 uv run --frozen pytest tests --durations=0 -vv + .PHONY: docker-test docker-test: ## Run project tests docker compose -f compose.yml run --rm api1 pytest tests --durations=0 -vv diff --git a/README.md b/README.md index 8ffef2e..a321257 100644 --- a/README.md +++ b/README.md @@ -234,10 +234,11 @@ generator yielding text chunks, plus `aclose()`) in a new class - e.g. wrapping return it from `build_chat_agent` for a new `backend` value. No changes are needed in `app/api/chat.py` or the session manager. -Run the tests for this service locally with: +Run the full test suite locally with: ```shell -pytest tests/api/test_chat_ws.py -vv +make test ``` +This starts PostgreSQL and Redis with Docker Compose, then points host-side tests at their published localhost ports.

(back to top)