From cd8d0bd6069b841706649bfd5357357dd432e7dd Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 15 May 2026 22:02:43 -0400 Subject: [PATCH] ci(integration): publish service ports, connect via localhost (host runner) --- .forgejo/workflows/ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 049c0fd..556413d 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -64,19 +64,19 @@ jobs: integration: # First-ever execution of the integration suite. Postgres uses the same # pgvector image as docker-compose; Redis backs the celery smoke tests. - # Assumes the python-ci runner executes jobs in a container so services - # are reachable by name (postgres/redis). If the runner runs jobs on the - # host instead, switch DB_HOST to localhost + add `ports:` mappings. + # The python-ci runner executes jobs on the host (not in a container), + # so services are NOT reachable by name — their ports are published and + # we connect via localhost. runs-on: python-ci env: DB_USER: fabledcurator DB_PASSWORD: ci_integration - DB_HOST: postgres + DB_HOST: localhost DB_PORT: "5432" DB_NAME: fabledcurator_test SECRET_KEY: ci_integration_placeholder - CELERY_BROKER_URL: redis://redis:6379/0 - CELERY_RESULT_BACKEND: redis://redis:6379/0 + CELERY_BROKER_URL: redis://localhost:6379/0 + CELERY_RESULT_BACKEND: redis://localhost:6379/0 services: postgres: image: pgvector/pgvector:pg16 @@ -84,6 +84,8 @@ jobs: POSTGRES_USER: fabledcurator POSTGRES_PASSWORD: ci_integration POSTGRES_DB: fabledcurator_test + ports: + - "5432:5432" options: >- --health-cmd "pg_isready -U fabledcurator" --health-interval 10s @@ -91,6 +93,8 @@ jobs: --health-retries 10 redis: image: redis:7-alpine + ports: + - "6379:6379" options: >- --health-cmd "redis-cli ping" --health-interval 10s