Skip to content

Deutsche Bahn on a self-hosted MOTIS, official Timetables API, import-time probe #2

Deutsche Bahn on a self-hosted MOTIS, official Timetables API, import-time probe

Deutsche Bahn on a self-hosted MOTIS, official Timetables API, import-time probe #2

Workflow file for this run

name: Keyless adapter probe
# Calls one real tool of every adapter that claims to need no API key, from a
# GitHub runner — a datacenter address, like the cloud. The README and the
# banner quote that number; this is what keeps it true. An adapter that only
# works from residential IPs must be marked `selfHostOnly` (hidden from the
# cloud catalog, excluded from the count) rather than advertised.
#
# The Deutsche Bahn adapter needs a MOTIS instance, so the job builds the one
# in deploy/motis and probes through it — which also proves that image still
# boots, downloads the feeds and imports them.
on:
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
pull_request:
paths:
- "deploy/motis/**"
- "scripts/probe-keyless.mjs"
- "packages/backend/src/adapters/de/deutsche-bahn.json"
jobs:
probe:
name: Probe keyless adapters from a datacenter IP
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Build and start MOTIS
run: |
docker build -t anythingmcp-motis:ci deploy/motis
docker run -d --name motis -p 8080:8080 anythingmcp-motis:ci
for i in $(seq 1 60); do
if curl -fsS "http://localhost:8080/api/v1/geocode?text=Berlin&type=STOP" > /dev/null 2>&1; then
echo "MOTIS up after ${i} checks"; break
fi
if [ "$i" = "60" ]; then
echo "::error::MOTIS did not come up"; docker logs motis; exit 1
fi
sleep 5
done
- name: Probe
env:
PROBE_MOTIS_URL: http://localhost:8080
run: node scripts/probe-keyless.mjs --check --all
- name: MOTIS logs
if: always()
run: docker logs motis 2>&1 | grep -v "\[debug\]" | tail -40