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

View File

@@ -0,0 +1,31 @@
-- Test 2: TimescaleDB
\set ON_ERROR_STOP on
DROP TABLE IF EXISTS sensors CASCADE;
CREATE TABLE sensors (
time TIMESTAMPTZ NOT NULL,
sensor_id INTEGER,
temperature DOUBLE PRECISION
);
-- Convert to hypertable
SELECT create_hypertable('sensors', 'time');
-- Insert data
INSERT INTO sensors (time, sensor_id, temperature) VALUES
(NOW(), 1, 20.0),
(NOW() + INTERVAL '1 hour', 1, 22.0);
-- Query data
DO $$
DECLARE
count int;
BEGIN
SELECT count(*) INTO count FROM sensors;
IF count != 2 THEN
RAISE EXCEPTION 'Hypertable insert failed';
END IF;
RAISE NOTICE 'TimescaleDB Check: OK';
END
$$;