ci: free host ports before starting e2e infrastructure
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

Port 5432 was already in use after docker compose cleanup because a
system-level PostgreSQL service on the runner host holds the port.
Also kill any stray containers binding to 5432/9000/9001.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-17 21:41:58 +01:00
parent 3f987ca48f
commit b456c8f1bd

View File

@@ -83,8 +83,15 @@ jobs:
- uses: actions/checkout@v4
# ── Infrastructure ──────────────────────────────────────────────────────
- name: Cleanup leftover containers from previous runs
run: docker compose down --volumes --remove-orphans
- name: Cleanup leftover containers and free ports
run: |
docker compose down --volumes --remove-orphans || true
# Stop system-level PostgreSQL if present (host service can occupy port 5432)
sudo systemctl stop postgresql || true
# Kill any remaining container still binding to our ports
for port in 5432 9000 9001; do
docker ps -q --filter "publish=$port" | xargs -r docker stop || true
done
- name: Start DB and MinIO
run: docker compose up -d db minio create-buckets