ci(integration): publish service ports, connect via localhost (host runner)
This commit is contained in:
@@ -64,19 +64,19 @@ jobs:
|
|||||||
integration:
|
integration:
|
||||||
# First-ever execution of the integration suite. Postgres uses the same
|
# First-ever execution of the integration suite. Postgres uses the same
|
||||||
# pgvector image as docker-compose; Redis backs the celery smoke tests.
|
# pgvector image as docker-compose; Redis backs the celery smoke tests.
|
||||||
# Assumes the python-ci runner executes jobs in a container so services
|
# The python-ci runner executes jobs on the host (not in a container),
|
||||||
# are reachable by name (postgres/redis). If the runner runs jobs on the
|
# so services are NOT reachable by name — their ports are published and
|
||||||
# host instead, switch DB_HOST to localhost + add `ports:` mappings.
|
# we connect via localhost.
|
||||||
runs-on: python-ci
|
runs-on: python-ci
|
||||||
env:
|
env:
|
||||||
DB_USER: fabledcurator
|
DB_USER: fabledcurator
|
||||||
DB_PASSWORD: ci_integration
|
DB_PASSWORD: ci_integration
|
||||||
DB_HOST: postgres
|
DB_HOST: localhost
|
||||||
DB_PORT: "5432"
|
DB_PORT: "5432"
|
||||||
DB_NAME: fabledcurator_test
|
DB_NAME: fabledcurator_test
|
||||||
SECRET_KEY: ci_integration_placeholder
|
SECRET_KEY: ci_integration_placeholder
|
||||||
CELERY_BROKER_URL: redis://redis:6379/0
|
CELERY_BROKER_URL: redis://localhost:6379/0
|
||||||
CELERY_RESULT_BACKEND: redis://redis:6379/0
|
CELERY_RESULT_BACKEND: redis://localhost:6379/0
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: pgvector/pgvector:pg16
|
image: pgvector/pgvector:pg16
|
||||||
@@ -84,6 +84,8 @@ jobs:
|
|||||||
POSTGRES_USER: fabledcurator
|
POSTGRES_USER: fabledcurator
|
||||||
POSTGRES_PASSWORD: ci_integration
|
POSTGRES_PASSWORD: ci_integration
|
||||||
POSTGRES_DB: fabledcurator_test
|
POSTGRES_DB: fabledcurator_test
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd "pg_isready -U fabledcurator"
|
--health-cmd "pg_isready -U fabledcurator"
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
@@ -91,6 +93,8 @@ jobs:
|
|||||||
--health-retries 10
|
--health-retries 10
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
|
ports:
|
||||||
|
- "6379:6379"
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd "redis-cli ping"
|
--health-cmd "redis-cli ping"
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
|
|||||||
Reference in New Issue
Block a user