Skip to content

Commit 28b11ad

Browse files
committed
ci(github): use localhost for service containers in github runner
Unlike Gitea Actions (where services and runners share a bridged network), GitHub Actions VM runners host the services and expose their ports on the runner VM's loopback interface. Communicating via container names like 'postgres' and 'redis' fails with name translation errors. Updated the test workflow to use 'localhost' as required by GitHub Actions.
1 parent 5e9e9cb commit 28b11ad

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ jobs:
4848
# URL and the b13 security-hygiene tests exercise POSTGRES_PASSWORD.
4949
POSTGRES_USER: admin
5050
POSTGRES_PASSWORD: password
51-
POSTGRES_HOST: postgres
51+
POSTGRES_HOST: localhost
5252
POSTGRES_PORT: 5432
5353
POSTGRES_DB: health_assistant_test
54-
REDIS_URL: redis://redis:6379
54+
REDIS_URL: redis://localhost:6379
5555
run: |
5656
cd backend
5757
# Mirror production Docker PYTHONPATH (/app/backend:/app) so the

0 commit comments

Comments
 (0)