@@ -120,6 +120,8 @@ jobs:
120120 run : |
121121 nohup docker compose up -d --build db-migration > /tmp/db-init.log 2>&1 &
122122 working-directory : coprocessor/fhevm-engine/tfhe-worker
123+ env :
124+ DB_HOST_PORT : 15432
123125
124126 - name : Setup Rust toolchain file
125127 run : cp coprocessor/fhevm-engine/rust-toolchain.toml .
@@ -161,7 +163,7 @@ jobs:
161163
162164 - name : Compile tests with coverage instrumentation
163165 env :
164- DATABASE_URL : postgresql://postgres:postgres@localhost:5432 /coprocessor
166+ DATABASE_URL : postgresql://postgres:postgres@localhost:15432 /coprocessor
165167 SQLX_OFFLINE : ' true'
166168 TEST_PACKAGE : ${{ matrix.package }}
167169 run : |
@@ -193,9 +195,23 @@ jobs:
193195 fi
194196 echo "Database migration completed"
195197
198+ - name : Verify database is accessible
199+ if : ${{ matrix.needs_db }}
200+ run : |
201+ echo "=== Docker containers ==="
202+ docker ps -a
203+ echo "=== Port mapping for db container ==="
204+ docker port db || true
205+ echo "=== db-init.log ==="
206+ cat /tmp/db-init.log || true
207+ echo "=== Checking localhost:15432 ==="
208+ docker exec db psql -U postgres -c '\l' || true
209+ echo "=== Checking from host ==="
210+ PGPASSWORD=postgres psql -h localhost -p 15432 -U postgres -c '\l' 2>&1 || true
211+
196212 - name : Run tests with coverage
197213 env :
198- DATABASE_URL : postgresql://postgres:postgres@localhost:5432 /coprocessor
214+ DATABASE_URL : postgresql://postgres:postgres@localhost:15432 /coprocessor
199215 SQLX_OFFLINE : ' true'
200216 COPROCESSOR_TEST_LOCALHOST : ' 1'
201217 TEST_GLOBAL_LOCALSTACK : ${{ matrix.needs_localstack && '1' || '0' }}
0 commit comments