feat: Add comprehensive test suite and cleanup step
All checks were successful
🚀 Docker Build and Push / build-and-push (15) (push) Successful in 5m54s
🚀 Docker Build and Push / build-and-push (16) (push) Successful in 6m0s
🚀 Docker Build and Push / build-and-push (17) (push) Successful in 5m56s
🚀 Docker Build and Push / build-and-push (18) (push) Successful in 6m4s

- Split validation into 4 granular CI steps (Config, Timescale, Vector, Hybrid)
- Added cleanup step for Docker images in CI
- Created SQL test scripts in tests/ for robustness
This commit is contained in:
2025-12-19 12:51:17 +01:00
parent 4ea4132653
commit df585b765a
5 changed files with 137 additions and 23 deletions

27
tests/test-3-vector.sql Normal file
View File

@@ -0,0 +1,27 @@
-- Test 3: VectorChord / pgvector
\set ON_ERROR_STOP on
DROP TABLE IF EXISTS items;
CREATE TABLE items (
id bigserial PRIMARY KEY,
embedding vector(3)
);
INSERT INTO items (embedding) VALUES ('[1,2,3]'), ('[4,5,6]'), ('[1.1, 2.1, 3.1]');
-- Create VectorChord Index
CREATE INDEX ON items USING vchordrq (embedding vector_l2_ops);
-- Search
DO $$
DECLARE
closest_id int;
BEGIN
SELECT id INTO closest_id FROM items ORDER BY embedding <-> '[1,2,3]' LIMIT 1;
IF closest_id != 1 THEN
RAISE EXCEPTION 'Vector search failed. Expected ID 1, got %', closest_id;
END IF;
RAISE NOTICE 'Vector Check: OK';
END
$$;