Fix CI integration tests.

This commit is contained in:
febux 2026-09-06 20:51:16 +03:00
parent 206e55d925
commit 5aff6e569e
2 changed files with 13 additions and 5 deletions

View file

@ -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)

View file

@ -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.