Fix CI integration tests.
This commit is contained in:
parent
206e55d925
commit
5aff6e569e
2 changed files with 13 additions and 5 deletions
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
|
@ -78,15 +78,19 @@ jobs:
|
||||||
- name: Sync dev dependencies
|
- name: Sync dev dependencies
|
||||||
run: uv sync --group dev --frozen
|
run: uv sync --group dev --frozen
|
||||||
|
|
||||||
- name: Start infrastructure (postgres/redis/rabbitmq/minio)
|
# No --wait: minio-init-test is a one-shot container that exits (0) after
|
||||||
run: docker compose up -d --wait
|
# 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
|
- name: Run integration tests
|
||||||
run: uv run pytest -m integration
|
run: uv run pytest -m integration
|
||||||
|
|
||||||
- name: Teardown infrastructure
|
- name: Teardown infrastructure
|
||||||
if: always()
|
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:
|
# 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)
|
# REGISTRY e.g. ghcr.io (or docker.io, your-private-registry.io)
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,13 @@
|
||||||
# tests/integration/conftest.py.
|
# tests/integration/conftest.py.
|
||||||
#
|
#
|
||||||
# Usage:
|
# 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
|
# 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
|
# The conftest.py fixture `infra` brings this file up automatically before the
|
||||||
# first integration test and tears it down after the session.
|
# first integration test and tears it down after the session.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue