fix(testing): correct tool-usage mock field name (average_response_time) #1128
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: Frontend Tests | |
| on: | |
| push: | |
| branches: [ "main", "debug/*", "feature/*", "claude/*" ] | |
| paths: | |
| - 'frontend/**' | |
| - 'packages/**' | |
| - 'bun.lock' | |
| - 'src/routes/auth.rs' | |
| - 'src/routes/admin.rs' | |
| - 'src/routes/web_admin.rs' | |
| - 'src/routes/coaches.rs' | |
| - 'src/routes/api_keys.rs' | |
| - 'src/routes/dashboard.rs' | |
| - 'src/models/**' | |
| - '.github/workflows/frontend-tests.yml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'frontend/**' | |
| - 'packages/**' | |
| - 'bun.lock' | |
| - 'src/routes/auth.rs' | |
| - 'src/routes/admin.rs' | |
| - 'src/routes/web_admin.rs' | |
| - 'src/routes/coaches.rs' | |
| - 'src/routes/api_keys.rs' | |
| - 'src/routes/dashboard.rs' | |
| - 'src/models/**' | |
| - '.github/workflows/frontend-tests.yml' | |
| workflow_dispatch: # Allow manual triggering | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| # Security: Explicit permissions following principle of least privilege | |
| permissions: | |
| contents: read | |
| jobs: | |
| frontend-tests: | |
| name: Frontend Test Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install all workspace dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Lint code | |
| working-directory: frontend | |
| run: bun run lint | |
| - name: Type check | |
| working-directory: frontend | |
| run: bunx tsc --noEmit | |
| - name: Run tests | |
| working-directory: frontend | |
| run: bun run test | |
| - name: Build frontend | |
| working-directory: frontend | |
| run: bun run build | |
| - name: Archive build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend-build | |
| path: frontend/dist/ | |
| retention-days: 7 | |
| e2e-tests: | |
| name: Playwright E2E Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install all workspace dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Install Playwright browsers | |
| working-directory: frontend | |
| run: bunx playwright install --with-deps chromium | |
| - name: Run Playwright E2E tests | |
| working-directory: frontend | |
| run: bun run test:e2e | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: playwright-report | |
| path: frontend/playwright-report/ | |
| retention-days: 7 | |
| - name: Upload test screenshots | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: playwright-screenshots | |
| path: frontend/test-results/ | |
| retention-days: 7 |