Files
codex 4c609cc7ea
CI / test (pull_request) Successful in 9m10s
CI / deploy (pull_request) Has been skipped
test: prepare resource-limited isolated VPS PostgreSQL stand
2026-10-05 12:48:06 +03:00

70 lines
1.7 KiB
YAML

name: miem-publication-integration-vps
services:
postgres-test:
image: miem-publication-integration-postgres:pr55
pull_policy: never
environment:
POSTGRES_USER: test_admin
POSTGRES_PASSWORD: isolated_test_admin
POSTGRES_DB: miem_import_test
command: ["postgres", "-c", "shared_buffers=64MB", "-c", "max_connections=12"]
cpus: 0.5
mem_limit: 512m
memswap_limit: 512m
pids_limit: 128
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "test_admin", "-d", "miem_import_test"]
interval: 2s
timeout: 5s
retries: 30
logging:
driver: json-file
options:
max-size: "5m"
max-file: "1"
networks: [isolated]
tests:
image: miem-publication-integration-runner:pr55
pull_policy: never
user: "65534:65534"
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
cpus: 0.5
mem_limit: 512m
memswap_limit: 512m
pids_limit: 128
tmpfs:
- /tmp:size=128m,mode=1777
environment:
DATABASE_URL: postgresql+psycopg://test_admin:isolated_test_admin@postgres-test:5432/miem_import_test
MIEM_POSTGRES_INTEGRATION: "1"
PYTHONDONTWRITEBYTECODE: "1"
PYTEST_ADDOPTS: "-p no:cacheprovider"
command: ["python", "-m", "pytest", "-q", "tests/test_publication_import_postgres.py"]
depends_on:
postgres-test:
condition: service_healthy
logging:
driver: json-file
options:
max-size: "5m"
max-file: "1"
networks: [isolated]
networks:
isolated:
internal: true
volumes:
pgdata:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
o: size=256m