Simplify BRouter healthcheck to port liveness; add routing wait in CI
The routing probe healthcheck was too strict — BRouter is up but may not have the segment loaded yet, causing all probes to fail. Use a simple liveness check (curl exit 0 when server responds on any code) so --wait unblocks as soon as the server is up. Add an explicit routing readiness wait step in CI that actually confirms a route can be computed before running E2E tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4d0a865437
commit
134cf4ccf1
2 changed files with 12 additions and 5 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
|
@ -209,6 +209,13 @@ jobs:
|
||||||
env:
|
env:
|
||||||
BROUTER_URL: http://localhost:17777
|
BROUTER_URL: http://localhost:17777
|
||||||
|
|
||||||
|
- name: Wait for BRouter routing
|
||||||
|
run: |
|
||||||
|
for i in $(seq 1 30); do
|
||||||
|
curl -sf 'http://localhost:17777/brouter?lonlats=13.4,52.5|13.5,52.5&profile=trekking&format=geojson' > /dev/null 2>&1 && break
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
|
||||||
- name: Push database schema
|
- name: Push database schema
|
||||||
run: pnpm db:push
|
run: pnpm db:push
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,11 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- brouter_segments:/data/segments
|
- brouter_segments:/data/segments
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "curl -sf 'http://localhost:17777/brouter?lonlats=13.4,52.5|13.5,52.5&profile=trekking&format=geojson' > /dev/null"]
|
test: ["CMD-SHELL", "curl -s http://localhost:17777/ > /dev/null 2>&1"]
|
||||||
interval: 10s
|
interval: 5s
|
||||||
timeout: 10s
|
timeout: 5s
|
||||||
retries: 18
|
retries: 30
|
||||||
start_period: 30s
|
start_period: 10s
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus:latest
|
image: prom/prometheus:latest
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue