BuyingAgent/.gitea/workflows/test.yml
Lars b276758ee1
All checks were successful
Deploy Development / deploy (push) Successful in 1m19s
Test Suite / pytest-backend (push) Successful in 31s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-checks (push) Successful in 28s
Stelle den Frontend-MVP und die v0.3-API auf develop bereit, damit Dev API und PWA zusammen deployen.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 13:04:59 +02:00

75 lines
2.3 KiB
YAML

name: Test Suite
on:
push:
branches: [develop]
workflow_run:
workflows: ["Deploy Development"]
types: [completed]
workflow_dispatch:
jobs:
pytest-backend:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: pytest against Dev Postgres (buyingagent_test)
run: |
set -e
APP_DIR="$HOME/docker/buyingagent-dev"
echo "pytest uses Dev Postgres (${APP_DIR}); event=${{ github.event_name }}"
cd "$APP_DIR"
for i in $(seq 1 60); do
if [ -f scripts/ci-pytest.sh ]; then
echo "ci-pytest.sh ready (attempt $i)"
break
fi
if [ "$i" -eq 60 ]; then
echo "timeout waiting for scripts/ci-pytest.sh after Dev deploy"
ls -la scripts || true
exit 1
fi
sleep 5
done
sh scripts/ci-pytest.sh
smoke-dev:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Non-destructive smoke against the running Dev API
run: |
set -e
echo "live Dev API (buyingagent-dev), read-only health"
for i in $(seq 1 60); do
if curl -sf http://localhost:8095/health/live >/dev/null; then
echo "DEV /health/live ready (attempt $i)"
break
fi
if [ "$i" -eq 60 ]; then
echo "timeout waiting for DEV /health/live"
exit 1
fi
sleep 5
done
curl -sf http://localhost:8095/health/live
echo
curl -sf http://localhost:8095/health/ready
echo
echo "LAN smoke OK: http://192.168.2.49:8095"
frontend-checks:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Frontend typecheck, lint, test, build
run: |
set -e
APP_DIR="$HOME/docker/buyingagent-dev"
cd "$APP_DIR/frontend"
npm ci || npm install
npm run typecheck
npm run lint
npm test
npm run build