Production Smoke Tests #61
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: Production Smoke Tests | |
| on: | |
| # Run after website changes are pushed (Vercel auto-deploys on main) | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'apps/web/**' | |
| # Run daily to catch issues early | |
| schedule: | |
| - cron: '0 6 * * *' # 6 AM UTC daily | |
| # Allow manual triggering | |
| workflow_dispatch: | |
| jobs: | |
| wait-for-deploy: | |
| name: Wait for Vercel Deploy | |
| runs-on: ubuntu-latest | |
| # Only wait on push events (schedule/dispatch test current production) | |
| if: github.event_name == 'push' | |
| steps: | |
| - name: Wait for Vercel deployment | |
| # Give Vercel time to deploy after push | |
| run: sleep 90 | |
| smoke-tests: | |
| name: Production Smoke Tests | |
| runs-on: ubuntu-latest | |
| needs: [wait-for-deploy] | |
| # Run even if wait job was skipped (schedule/dispatch) | |
| if: ${{ !cancelled() && (needs.wait-for-deploy.result == 'success' || needs.wait-for-deploy.result == 'skipped') }} | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| working-directory: apps/web | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Install Playwright browsers | |
| run: bunx playwright install --with-deps chromium | |
| - name: Run production smoke tests | |
| run: bunx playwright test e2e/production.spec.ts --project=chromium --reporter=github | |
| env: | |
| PLAYWRIGHT_BASE_URL: https://agent-flywheel.com | |
| CI: true | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: production-smoke-results | |
| path: | | |
| apps/web/playwright-report/ | |
| apps/web/test-results/ | |
| retention-days: 7 |