Skip to content

E2E β€” full (self-hosted, with models) #7

E2E β€” full (self-hosted, with models)

E2E β€” full (self-hosted, with models) #7

Workflow file for this run

name: E2E β€” full (self-hosted, with models)
# The FULL e2e suite needs a server with trained models. Those aren't in the cloud CI (they're
# regenerated from cited sources), so this workflow runs on a SELF-HOSTED runner on the demo box,
# where the app + models already run at :8000.
#
# Triggers are workflow_dispatch + schedule only β€” NEVER pull_request β€” so a fork PR can't run
# code on the self-hosted box. Register a runner labelled `flavormancer` on the demo box:
# Settings β†’ Actions β†’ Runners β†’ New self-hosted runner (then `./run.sh` on the box)
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * 1" # weekly, Monday 07:00 UTC
permissions:
contents: read
jobs:
full:
name: Full e2e against the live models
runs-on: [self-hosted, flavormancer]
steps:
- uses: actions/checkout@v4
- name: Deps + browser
run: |
python -m pip install --quiet pytest playwright
python -m playwright install chromium || true
- name: Start a dedicated multi-worker test server
# A dedicated 4-worker server (the box is 32-core) so the 13 back-to-back Playwright
# tests don't queue behind a single worker and time out. Isolated on :8011 so it never
# disturbs the live demo app on :8000. Each worker loads its own copy of the models.
working-directory: training
run: |
nohup python -m uvicorn app:app --host 127.0.0.1 --port 8011 --workers 4 \
> /tmp/flavor-e2e-app.log 2>&1 &
for i in $(seq 1 60); do
curl -sf http://127.0.0.1:8011/api/studio_terms >/dev/null && { echo "app up"; break; }
sleep 2
done
- name: Full suite against the multi-worker server (all models loaded)
env:
FLAVORMANCER_URL: http://127.0.0.1:8011
run: pytest tests/e2e -q
- name: Stop the test server
if: always()
run: pkill -f "uvicorn app:app.*8011" || true