Skip to content

feat(core): say why an elevation left nothing to answer with #152

feat(core): say why an elevation left nothing to answer with

feat(core): say why an elevation left nothing to answer with #152

Workflow file for this run

name: App E2E
# The E2E suite runs the app against a live backend started from src/, so a change
# to either side can break it. Its filter therefore covers both, unlike app-tests.yml,
# whose node checks only ever read the app.
on:
pull_request:
paths:
- 'app/**'
- 'src/wetterdienst/**'
- 'pyproject.toml'
- 'uv.lock'
- '.github/workflows/app-e2e.yml'
push:
branches: [ main ]
paths:
- 'app/**'
- 'src/wetterdienst/**'
- 'pyproject.toml'
- 'uv.lock'
- '.github/workflows/app-e2e.yml'
# Allow job to be triggered manually
workflow_dispatch:
# Cancel in-progress jobs when pushing to the same branch
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
permissions: {}
jobs:
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '24'
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 11
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v6
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright browsers
run: npx playwright install --with-deps firefox
- name: Setup uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: '3.14'
enable-cache: true
- name: Install backend dependencies
working-directory: .
run: |
uv sync --no-dev --extra restapi
uv pip list
- name: Verify wetterdienst installation
working-directory: .
run: |
uv run wetterdienst --version
uv run wetterdienst info
- name: Start backend
working-directory: .
run: |
uv run wetterdienst restapi --listen 0.0.0.0:3000 > backend.log 2>&1 &
echo $! > backend.pid
echo "Backend started with PID $(cat backend.pid)"
- name: Wait for backend to be ready
run: |
echo "Waiting for backend to start..."
for i in {1..30}; do
if curl -f http://localhost:3000/health > /dev/null 2>&1; then
echo "✅ Backend is ready!"
exit 0
fi
echo "Attempt $i/30: Backend not ready yet, waiting..."
sleep 2
done
echo "❌ Backend failed to start within 60 seconds"
echo "Backend logs:"
cat backend.log || echo "No backend logs found"
exit 1
- name: Run E2E tests
run: pnpm run test:e2e
env:
BACKEND_URL: http://localhost:3000
CI: true
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: app/playwright-report/
retention-days: 7
- name: Upload backend logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: backend-logs
path: backend.log
retention-days: 3
- name: Stop backend
if: always()
working-directory: .
run: |
if [ -f backend.pid ]; then
echo "Stopping backend process $(cat backend.pid)"
kill $(cat backend.pid) || true
rm backend.pid
fi
# Also try to kill any remaining wetterdienst processes
pkill -f "wetterdienst restapi" || true