diff --git a/.gitea/workflows/pipeline.yml b/.gitea/workflows/pipeline.yml index 9dd01bd..d086549 100644 --- a/.gitea/workflows/pipeline.yml +++ b/.gitea/workflows/pipeline.yml @@ -114,33 +114,26 @@ jobs: api-integration: name: API Integration Tests runs-on: ubuntu-latest - services: - postgres: - image: postgres:16 - env: - POSTGRES_USER: reactbin - POSTGRES_PASSWORD: reactbin - POSTGRES_DB: reactbin_test - ports: - - 5432:5432 - options: >- - --health-cmd pg_isready - --health-interval 5s - --health-timeout 5s - --health-retries 10 steps: - uses: actions/checkout@v4 - - name: Start MinIO + - name: Start services run: | + docker run -d --name ci-postgres \ + --network container:$(hostname) \ + -e POSTGRES_USER=reactbin \ + -e POSTGRES_PASSWORD=reactbin \ + -e POSTGRES_DB=reactbin_test \ + postgres:16 docker run -d --name ci-minio \ --network container:$(hostname) \ -e MINIO_ROOT_USER=minioadmin \ -e MINIO_ROOT_PASSWORD=minioadmin \ quay.io/minio/minio server /data - - name: Create MinIO bucket + - name: Wait for services and create bucket run: | + until docker exec ci-postgres pg_isready -U reactbin; do sleep 2; done curl -fsSL https://dl.min.io/client/mc/release/linux-amd64/mc -o /tmp/mc chmod +x /tmp/mc until /tmp/mc alias set local http://localhost:9000 minioadmin minioadmin; do sleep 2; done @@ -178,9 +171,9 @@ jobs: OWNER_USERNAME: testowner OWNER_PASSWORD: testpass - - name: Stop MinIO + - name: Stop services if: always() - run: docker stop ci-minio && docker rm ci-minio || true + run: docker stop ci-postgres ci-minio || true && docker rm ci-postgres ci-minio || true # ── Image builds (tag-only, gated on all jobs) ────────────────────────────────