From 5aff6e569efd068e542490d9864e52107f2e3fd8 Mon Sep 17 00:00:00 2001 From: febux Date: Sun, 6 Sep 2026 20:51:16 +0300 Subject: [PATCH] Fix CI integration tests. --- .github/workflows/ci.yml | 10 +++++++--- docker-compose.test.yml | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adeafea..1f723ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,15 +78,19 @@ jobs: - name: Sync dev dependencies run: uv sync --group dev --frozen - - name: Start infrastructure (postgres/redis/rabbitmq/minio) - run: docker compose up -d --wait + # No --wait: minio-init-test is a one-shot container that exits (0) after + # creating the bucket, and --wait treats any exited container as failure. + # Health polling is done by the `infra` fixture in + # tests/integration/conftest.py; this step just pre-pulls the images. + - name: Start test infrastructure (postgres/redis/rabbitmq/minio) + run: docker compose -p contract-check-test -f docker-compose.test.yml up -d - name: Run integration tests run: uv run pytest -m integration - name: Teardown infrastructure if: always() - run: docker compose down -v + run: docker compose -p contract-check-test -f docker-compose.test.yml down -v # Build and push service images on pushes to main. Set these repository secrets: # REGISTRY e.g. ghcr.io (or docker.io, your-private-registry.io) diff --git a/docker-compose.test.yml b/docker-compose.test.yml index a7af44a..4a66fab 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -7,9 +7,13 @@ # tests/integration/conftest.py. # # Usage: -# docker compose -f docker-compose.test.yml up -d --wait +# docker compose -p contract-check-test -f docker-compose.test.yml up -d # uv run pytest -m integration -# docker compose -f docker-compose.test.yml down -v +# docker compose -p contract-check-test -f docker-compose.test.yml down -v +# +# Do NOT use --wait: minio-init-test is a one-shot container that exits after +# creating the bucket, and --wait treats any exited container as a failure +# (even with exit code 0). Health polling is handled by conftest.py. # # The conftest.py fixture `infra` brings this file up automatically before the # first integration test and tears it down after the session.