ci(forgejo): robust BRouter segment seed + longer routing warmup (e2e)
Some checks failed
CI / Dockerfile Package Check (push) Successful in 29s
CI / Security Scan (push) Successful in 3m24s
CI / OpenSpec Validate (push) Successful in 2m52s
CI / Typecheck (push) Successful in 5m51s
CI / Lint (push) Successful in 6m38s
CI / Unit Tests (push) Successful in 3m42s
CI / Build (push) Successful in 3m10s
CI / Journal Image Smoke Test (push) Failing after 4m7s
CI / E2E Tests (push) Failing after 3m53s
CI / Visual Tests (push) Successful in 10m9s

- verify the segment download is non-empty (retry x3); brouter.de is flaky
  and a silent empty download surfaced only as a 240s routing timeout.
- bump routing readiness wait 120s->240s (segment load on a busy runner).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-07-22 22:09:22 +02:00
parent f31eb26981
commit 6f2c1d8492
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -214,10 +214,19 @@ jobs:
# container — a job-side download + bind mount would not be visible to
# the DinD daemon (separate filesystem). Project name pinned to `trails`
# so the volume matches docker-compose.dev.yml's `brouter_segments`.
# Verify the download is non-empty (brouter.de can be flaky) so a bad
# segment fails here rather than as a mysterious routing timeout later.
run: |
docker volume create trails_brouter_segments
docker run --rm -v trails_brouter_segments:/dst alpine sh -c \
"wget -q https://brouter.de/brouter/segments4/E10_N50.rd5 -O /dst/E10_N50.rd5 && chmod a+r /dst/*.rd5"
docker run --rm -v trails_brouter_segments:/dst alpine sh -c '
set -e
for a in 1 2 3; do
wget -q https://brouter.de/brouter/segments4/E10_N50.rd5 -O /dst/E10_N50.rd5 && break
echo "segment download attempt $a failed; retrying"; sleep 5
done
test -s /dst/E10_N50.rd5
chmod a+r /dst/*.rd5
ls -la /dst'
- name: Start services
run: docker compose -p trails -f docker-compose.dev.yml up -d --wait --build postgres brouter
@ -226,9 +235,9 @@ jobs:
- name: Wait for BRouter routing
run: |
for i in $(seq 1 60); do
for i in $(seq 1 120); do
curl -s 'http://host.docker.internal:17777/brouter?lonlats=13.4,52.5|13.5,52.5&profile=trekking&format=geojson' 2>/dev/null | grep -q "FeatureCollection" && echo "BRouter ready" && break
[ "$i" = "60" ] && echo "BRouter not ready after 120s" && exit 1
[ "$i" = "120" ] && echo "BRouter not ready after 240s" && exit 1
sleep 2
done