Skip to content

Commit bb393b7

Browse files
authored
ci(e2e): formally defer Playwright browser E2E + fix legacy comments (#647) (#685)
The two browser-level Playwright jobs (e2e-smoke-tests, e2e-frontend-tests) were commented out with "web-ui is legacy during v2 CLI-first refactor" — contradicting CLAUDE.md (web UI is actively developed). They can't simply be re-enabled: the tests/e2e/*.spec.ts suite targets a /projects/[id] route architecture the current Phase-3+ workspace UI no longer has (19/19 specs reference /projects; navigates to /projects/${id} 36+ times), so it fails as-is. Formally defer instead of leaving a misleading disable: - Remove the 326 lines of stale commented-out job bodies (preserved in git history); replace with a concise deferral note referencing the rewrite issue. - Correct the schedule-cron comment and remove the "legacy" claim. - Rewrite tracked in #684. No functional CI change (jobs were already not running); test-summary wiring unchanged. The remaining "legacy" reference (line ~250) is about v1 Python modules, not the web UI. Closes #647
1 parent b2ced8f commit bb393b7

1 file changed

Lines changed: 12 additions & 326 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 326 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ on:
66
pull_request:
77
branches: [main, develop]
88
workflow_call: # Allow this workflow to be called by other workflows
9+
# Nightly browser-E2E schedule is intentionally OFF: the Playwright E2E suite is
10+
# deferred pending a rewrite against the current Phase-3+ UI (tracked in #684).
11+
# Re-enable this cron once those jobs are green.
912
# schedule:
10-
# Run E2E tests nightly at 2 AM UTC
11-
# - cron: '0 2 * * *'
13+
# - cron: '0 2 * * *'
1214

1315
env:
1416
PYTHON_VERSION: '3.11'
@@ -426,331 +428,15 @@ jobs:
426428
retention-days: 7
427429

428430
# ============================================
429-
# E2E Smoke Tests (Playwright - Chromium only)
431+
# E2E Browser Tests (Playwright) — DEFERRED (see #684)
430432
# ============================================
431-
# DISABLED: web-ui is legacy during v2 CLI-first refactor
432-
# Re-enable when web-ui package.json is restored
433-
# e2e-smoke-tests:
434-
# name: E2E Smoke Tests (Chromium)
435-
# runs-on: ubuntu-latest
436-
# # Run on PRs for fast feedback
437-
# if: github.event_name == 'pull_request'
438-
#
439-
# steps:
440-
# - name: Checkout code
441-
# uses: actions/checkout@v4
442-
#
443-
# - name: Set up Node.js
444-
# uses: actions/setup-node@v4
445-
# with:
446-
# node-version: ${{ env.NODE_VERSION }}
447-
# cache: 'npm'
448-
# cache-dependency-path: 'web-ui/package-lock.json'
449-
#
450-
# - name: Set up Python
451-
# uses: actions/setup-python@v5
452-
# with:
453-
# python-version: ${{ env.PYTHON_VERSION }}
454-
#
455-
# - name: Install uv
456-
# uses: astral-sh/setup-uv@v4
457-
# with:
458-
# enable-cache: true
459-
#
460-
# - name: Install Python dependencies
461-
# run: |
462-
# uv venv
463-
# uv sync
464-
#
465-
# - name: Install frontend dependencies
466-
# working-directory: web-ui
467-
# run: npm ci
468-
#
469-
# - name: Install E2E test dependencies
470-
# working-directory: tests/e2e
471-
# run: |
472-
# npm ci
473-
# # Rebuild native modules for current Node.js version
474-
# # (better-sqlite3 requires matching NODE_MODULE_VERSION)
475-
# npm rebuild better-sqlite3
476-
#
477-
# - name: Install Playwright browsers (Chromium only)
478-
# working-directory: tests/e2e
479-
# run: npx playwright install chromium --with-deps
480-
#
481-
# - name: Install codeframe package
482-
# run: |
483-
# uv pip install -e .
484-
# echo "✅ Package installed in editable mode"
485-
#
486-
# - name: Initialize database
487-
# run: |
488-
# # E2E tests expect database at tests/e2e/.codeframe/state.db
489-
# mkdir -p tests/e2e/.codeframe
490-
# source .venv/bin/activate
491-
# python -c "from codeframe.platform_store.database import Database; db = Database('tests/e2e/.codeframe/state.db'); db.initialize(); db.close()"
492-
# echo "✅ Database initialized at tests/e2e/.codeframe/state.db"
493-
#
494-
# - name: Start backend server
495-
# env:
496-
# # Must match TEST_DB_PATH in tests/e2e/e2e-config.ts
497-
# DATABASE_PATH: ${{ github.workspace }}/tests/e2e/.codeframe/state.db
498-
# WORKSPACE_ROOT: ${{ github.workspace }}
499-
# CODEFRAME_DEPLOYMENT_MODE: self_hosted
500-
# run: |
501-
# source .venv/bin/activate
502-
# python -m uvicorn codeframe.ui.server:app --port 8080 > /tmp/backend.log 2>&1 &
503-
# echo "BACKEND_PID=$!" >> $GITHUB_ENV
504-
# echo "Backend started with PID: $!"
505-
#
506-
# - name: Wait for backend to be ready
507-
# run: |
508-
# echo "Waiting for backend to start..."
509-
# for i in {1..120}; do
510-
# if curl -s http://localhost:8080/health > /dev/null; then
511-
# echo "✅ Backend is ready!"
512-
# curl -s http://localhost:8080/health | jq .
513-
# break
514-
# fi
515-
# echo "Attempt $i/120: Backend not ready yet..."
516-
# sleep 1
517-
# if [ $i -eq 120 ]; then
518-
# echo "❌ Backend failed to start within 120 seconds"
519-
# cat /tmp/backend.log
520-
# exit 1
521-
# fi
522-
# done
523-
#
524-
# - name: Start frontend dev server
525-
# working-directory: web-ui
526-
# env:
527-
# PORT: 3001
528-
# NEXT_PUBLIC_API_URL: http://localhost:8080
529-
# run: |
530-
# npm run dev > /tmp/frontend.log 2>&1 &
531-
# echo "FRONTEND_PID=$!" >> $GITHUB_ENV
532-
# echo "Frontend started with PID: $! on port 3001"
533-
#
534-
# - name: Wait for frontend to be ready
535-
# run: |
536-
# echo "Waiting for frontend to start on port 3001..."
537-
# for i in {1..60}; do
538-
# if curl -s http://localhost:3001 > /dev/null; then
539-
# echo "✅ Frontend is ready on port 3001!"
540-
# break
541-
# fi
542-
# echo "Attempt $i/60: Frontend not ready yet..."
543-
# sleep 1
544-
# if [ $i -eq 60 ]; then
545-
# echo "❌ Frontend failed to start within 60 seconds"
546-
# cat /tmp/frontend.log
547-
# exit 1
548-
# fi
549-
# done
550-
#
551-
# - name: Run Playwright smoke tests (Chromium only)
552-
# working-directory: tests/e2e
553-
# run: npm run test:smoke
554-
#
555-
# - name: Upload Playwright report
556-
# if: always()
557-
# uses: actions/upload-artifact@v4
558-
# with:
559-
# name: playwright-smoke-report
560-
# path: tests/e2e/playwright-report/
561-
# retention-days: 7
562-
#
563-
# - name: Upload backend logs
564-
# if: always()
565-
# uses: actions/upload-artifact@v4
566-
# with:
567-
# name: e2e-smoke-backend-logs
568-
# path: /tmp/backend.log
569-
# retention-days: 7
570-
#
571-
# - name: Upload frontend logs
572-
# if: always()
573-
# uses: actions/upload-artifact@v4
574-
# with:
575-
# name: e2e-smoke-frontend-logs
576-
# path: /tmp/frontend.log
577-
# retention-days: 7
578-
#
579-
# - name: Stop servers
580-
# if: always()
581-
# run: |
582-
# if [ -n "$BACKEND_PID" ]; then
583-
# kill $BACKEND_PID || true
584-
# fi
585-
# if [ -n "$FRONTEND_PID" ]; then
586-
# kill $FRONTEND_PID || true
587-
# fi
588-
589-
# ============================================
590-
# E2E Frontend Tests (Playwright - All Browsers)
591-
# ============================================
592-
# COMMENTED OUT: Enable when smoke tests are passing consistently
593-
# e2e-frontend-tests:
594-
# name: E2E Frontend Tests (All Browsers)
595-
# runs-on: ubuntu-latest
596-
# # Only run on main branch or scheduled runs
597-
# if: github.ref == 'refs/heads/main' || github.event_name == 'schedule'
598-
#
599-
# steps:
600-
# - name: Checkout code
601-
# uses: actions/checkout@v4
602-
#
603-
# - name: Set up Node.js
604-
# uses: actions/setup-node@v4
605-
# with:
606-
# node-version: ${{ env.NODE_VERSION }}
607-
# cache: 'npm'
608-
# cache-dependency-path: 'web-ui/package-lock.json'
609-
#
610-
# - name: Set up Python
611-
# uses: actions/setup-python@v5
612-
# with:
613-
# python-version: ${{ env.PYTHON_VERSION }}
614-
#
615-
# - name: Install uv
616-
# uses: astral-sh/setup-uv@v4
617-
# with:
618-
# enable-cache: true
619-
#
620-
# - name: Install Python dependencies
621-
# run: |
622-
# uv venv
623-
# uv sync
624-
#
625-
# - name: Install frontend dependencies
626-
# working-directory: web-ui
627-
# run: npm ci
628-
#
629-
# - name: Install E2E test dependencies
630-
# working-directory: tests/e2e
631-
# run: npm ci
632-
#
633-
# - name: Install Playwright browsers
634-
# working-directory: tests/e2e
635-
# run: npx playwright install --with-deps
636-
#
637-
# - name: Install codeframe package
638-
# run: |
639-
# uv pip install -e .
640-
# echo "✅ Package installed in editable mode"
641-
#
642-
# - name: Initialize database
643-
# run: |
644-
# mkdir -p .codeframe
645-
# source .venv/bin/activate
646-
# python -c "from codeframe.platform_store.database import Database; db = Database('.codeframe/state.db'); db.initialize(); db.close()"
647-
# echo "✅ Database initialized"
648-
#
649-
# - name: Start backend server
650-
# env:
651-
# DATABASE_PATH: ${{ github.workspace }}/.codeframe/state.db
652-
# WORKSPACE_ROOT: ${{ github.workspace }}
653-
# CODEFRAME_DEPLOYMENT_MODE: self_hosted
654-
# run: |
655-
# source .venv/bin/activate
656-
# python -m uvicorn codeframe.ui.server:app --port 8080 > /tmp/backend.log 2>&1 &
657-
# echo "BACKEND_PID=$!" >> $GITHUB_ENV
658-
# echo "Backend started with PID: $!"
659-
#
660-
# - name: Verify backend startup
661-
# run: |
662-
# sleep 5
663-
# if ! ps -p $BACKEND_PID > /dev/null; then
664-
# echo "❌ Backend process died immediately"
665-
# cat /tmp/backend.log
666-
# exit 1
667-
# fi
668-
# echo "✅ Backend process is running (PID: $BACKEND_PID)"
669-
#
670-
# - name: Wait for backend to be ready
671-
# run: |
672-
# echo "Waiting for backend to start..."
673-
# for i in {1..120}; do
674-
# if curl -s http://localhost:8080/health > /dev/null; then
675-
# echo "✅ Backend is ready!"
676-
# curl -s http://localhost:8080/health | jq .
677-
# break
678-
# fi
679-
# echo "Attempt $i/120: Backend not ready yet..."
680-
# sleep 1
681-
# if [ $i -eq 120 ]; then
682-
# echo "❌ Backend failed to start within 120 seconds"
683-
# echo "=== Backend Logs ==="
684-
# cat /tmp/backend.log
685-
# exit 1
686-
# fi
687-
# done
688-
#
689-
# - name: Start frontend dev server
690-
# working-directory: web-ui
691-
# run: |
692-
# npm run dev > /tmp/frontend.log 2>&1 &
693-
# echo "FRONTEND_PID=$!" >> $GITHUB_ENV
694-
# echo "Frontend started with PID: $!"
695-
#
696-
# - name: Wait for frontend to be ready
697-
# run: |
698-
# echo "Waiting for frontend to start..."
699-
# for i in {1..60}; do
700-
# if curl -s http://localhost:3000 > /dev/null; then
701-
# echo "✅ Frontend is ready!"
702-
# break
703-
# fi
704-
# echo "Attempt $i/60: Frontend not ready yet..."
705-
# sleep 1
706-
# if [ $i -eq 60 ]; then
707-
# echo "❌ Frontend failed to start within 60 seconds"
708-
# echo "=== Frontend Logs ==="
709-
# cat /tmp/frontend.log
710-
# exit 1
711-
# fi
712-
# done
713-
#
714-
# - name: Run Playwright E2E tests
715-
# working-directory: tests/e2e
716-
# run: |
717-
# npx playwright test \
718-
# --config=playwright.config.ts \
719-
# *.spec.ts
720-
#
721-
# - name: Upload Playwright report
722-
# if: always()
723-
# uses: actions/upload-artifact@v4
724-
# with:
725-
# name: playwright-report
726-
# path: tests/e2e/playwright-report/
727-
# retention-days: 30
728-
#
729-
# - name: Upload backend logs
730-
# if: always()
731-
# uses: actions/upload-artifact@v4
732-
# with:
733-
# name: e2e-frontend-backend-logs
734-
# path: /tmp/backend.log
735-
# retention-days: 7
736-
#
737-
# - name: Upload frontend logs
738-
# if: always()
739-
# uses: actions/upload-artifact@v4
740-
# with:
741-
# name: e2e-frontend-frontend-logs
742-
# path: /tmp/frontend.log
743-
# retention-days: 7
744-
#
745-
# - name: Stop servers
746-
# if: always()
747-
# run: |
748-
# if [ -n "$BACKEND_PID" ]; then
749-
# kill $BACKEND_PID || true
750-
# fi
751-
# if [ -n "$FRONTEND_PID" ]; then
752-
# kill $FRONTEND_PID || true
753-
# fi
433+
# The browser-level Playwright E2E jobs (Chromium smoke + all-browsers) are
434+
# intentionally deferred, not abandoned. The tests/e2e/*.spec.ts suite targets a
435+
# /projects/[id] route architecture that the current Phase-3+ workspace UI no
436+
# longer has (pages are /tasks, /execution, /proof, etc.), so it cannot pass
437+
# as-is and needs a rewrite. Tracked in issue #684. The nightly `schedule:` cron
438+
# at the top of this file stays off until that rewrite lands and the jobs are
439+
# green. The prior (stale) job definitions remain available in git history.
754440

755441
# ============================================
756442
# TestSprite E2E Tests (Optional)

0 commit comments

Comments
 (0)