supervised fit #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E | |
| # Playwright golden-path + accessibility + warehouse + academy + tour-recording | |
| # + topology-editor suites against a freshly-built React studio. Runs ~10 min | |
| # on a clean runner so it gates `push` to main and `pull_request` to main only — | |
| # we don't want it on every feature-branch push. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install hmm-studio (Python) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[web,dev]" | |
| - name: Build frontend | |
| run: python scripts/build_frontend.py | |
| - name: Install e2e deps | |
| working-directory: e2e | |
| run: | | |
| npm ci | |
| npx playwright install --with-deps chromium | |
| - name: Start hmm-studio (background) | |
| env: | |
| # Point the studio at the committed warehouse fixture so the | |
| # warehouse.spec.ts E2E tests (Phase B.10c) see a populated sidebar. | |
| HMM_STUDIO_WAREHOUSE_PATH: ${{ github.workspace }}/e2e/fixtures/warehouse | |
| run: | | |
| hmm-studio --host 127.0.0.1 --port 8000 & | |
| echo $! > /tmp/hmm-studio.pid | |
| # Wait for /health | |
| for i in {1..30}; do | |
| if curl -sf http://127.0.0.1:8000/health > /dev/null; then | |
| echo "studio is up" | |
| break | |
| fi | |
| sleep 2 | |
| done | |
| - name: Run e2e tests | |
| working-directory: e2e | |
| run: npm test | |
| - name: Upload playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: e2e/playwright-report/ | |
| retention-days: 7 | |
| - name: Stop hmm-studio | |
| if: always() | |
| run: | | |
| if [ -f /tmp/hmm-studio.pid ]; then | |
| kill $(cat /tmp/hmm-studio.pid) || true | |
| fi |