From 9f3f022ec0dbb1e52f214b3748aa346b1109d6df Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 19 Mar 2026 11:08:41 +0100 Subject: [PATCH] ci: set up CI pipeline with unit, backend, and E2E test jobs - Add unit-tests job using Playwright Docker image (no apt install needed) - Add backend-unit-tests job with Java 21 + Maven - Add e2e-tests job: PostgreSQL + MinIO via docker-compose, Spring Boot backend, SvelteKit dev server, Playwright Chromium - Use non-conflicting host ports (DB: 15432, MinIO: 19000/19001) - Install Docker CLI via official Docker apt repo (Playwright image has no daemon) - Connect job container to archive-net for direct DB/MinIO access - Pin DOCKER_API_VERSION=1.43 for Docker socket compatibility - Start backend with java -jar + health-check loop (curl /actuator/health) - Use continue-on-error on cleanup step to handle SIGKILL gracefully - Downgrade upload-artifact to v3 (v4 not supported on self-hosted Gitea) - Always run npm ci unconditionally (actions/cache@v4 broken on this runner) - Log /tmp/backend.log on startup timeout so Spring Boot errors are visible - Add diagnostic steps for DB tables and Flyway schema history Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docker-compose.ci.yml diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml new file mode 100644 index 00000000..2a944495 --- /dev/null +++ b/docker-compose.ci.yml @@ -0,0 +1,18 @@ +# CI override — replaces host bind mounts with ephemeral named volumes. +# Host port bindings are handled via PORT_DB/PORT_MINIO_API env vars in ci.yml +# (set to non-standard ports to avoid conflicts with system services on the runner). +# +# Usage: +# docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d db minio create-buckets +services: + db: + volumes: + - ci_postgres_data:/var/lib/postgresql/data + + minio: + volumes: + - ci_minio_data:/data + +volumes: + ci_postgres_data: + ci_minio_data: