diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a97f5432..6901163a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -48,8 +48,6 @@ jobs: POSTGRES_DB: wizamart_test POSTGRES_USER: test_user POSTGRES_PASSWORD: test_password - ports: - - 5433:5432 options: >- --health-cmd "pg_isready -U test_user -d wizamart_test" --health-interval 10s @@ -57,8 +55,10 @@ jobs: --health-retries 5 env: - TEST_DATABASE_URL: "postgresql://test_user:test_password@localhost:5433/wizamart_test" - DATABASE_URL: "postgresql://test_user:test_password@localhost:5433/wizamart_test" + # act_runner executes jobs in Docker containers on the same network as services, + # so use the service name (postgres) as hostname with the internal port (5432) + TEST_DATABASE_URL: "postgresql://test_user:test_password@postgres:5432/wizamart_test" + DATABASE_URL: "postgresql://test_user:test_password@postgres:5432/wizamart_test" steps: - uses: actions/checkout@v4