Files
codex 8adaa4d6ea
CI / test (pull_request) Successful in 9m12s
CI / deploy (pull_request) Has been skipped
test: prepare isolated PostgreSQL publication integration checks
2026-10-05 12:29:17 +03:00

37 lines
1016 B
YAML

name: miem-publication-integration
services:
postgres-test:
image: postgres:16-alpine
environment:
POSTGRES_USER: test_admin
POSTGRES_PASSWORD: isolated_test_admin
POSTGRES_DB: miem_import_test
tmpfs:
- /var/lib/postgresql/data
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/10-test.sql:ro
healthcheck:
test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "test_admin", "-d", "miem_import_test"]
interval: 2s
timeout: 5s
retries: 30
networks: [isolated]
tests:
build:
context: ../..
dockerfile: tests/postgres/Dockerfile
environment:
DATABASE_URL: postgresql+psycopg://test_admin:isolated_test_admin@postgres-test:5432/miem_import_test
MIEM_POSTGRES_INTEGRATION: "1"
command: ["python", "-m", "pytest", "-q", "tests/test_publication_import_postgres.py"]
depends_on:
postgres-test:
condition: service_healthy
networks: [isolated]
networks:
isolated:
internal: true