Test fix on local
CI / backend (push) Failing after 6m14s
CI / frontend (push) Failing after 1m48s

This commit is contained in:
voltsrage
2026-08-05 21:10:21 +08:00
parent a6a491a2da
commit 6d6bee9cb5
2 changed files with 17 additions and 4 deletions
+8 -1
View File
@@ -14,6 +14,11 @@ on:
jobs:
backend:
runs-on: ubuntu-latest
env:
# Kafka advertises this host on its EXTERNAL listener. The test process runs in
# a job container, so "localhost" (the compose default, correct for a dev box)
# would point the client at itself after bootstrap.
KAFKA_EXTERNAL_HOST: host.docker.internal
steps:
- uses: actions/checkout@v4
@@ -34,9 +39,11 @@ jobs:
- name: Wait for Kafka
run: |
for i in $(seq 1 90); do
# Probe the INTERNAL listener: the EXTERNAL one advertises
# host.docker.internal, which does not resolve inside the broker container.
if docker compose exec -T kafka \
/opt/kafka/bin/kafka-broker-api-versions.sh \
--bootstrap-server localhost:9092 >/dev/null 2>&1; then
--bootstrap-server kafka:29092 >/dev/null 2>&1; then
echo "Kafka is ready"
exit 0
fi