e2e #88
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
| # Non-PR-blocking Playwright E2E journeys (see docs/operations-testing.md). | |
| # Runs nightly and on demand; failures alert but never gate merges. | |
| name: e2e | |
| on: | |
| schedule: | |
| - cron: "0 3 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| e2e: | |
| name: Playwright E2E journeys | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| steps: | |
| - name: 🛒 Checkout code | |
| uses: actions/checkout@v3 | |
| - name: 🧩 Setup Bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: 1.3.1 | |
| - name: 🧩 Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: 🔨 Build shared package | |
| run: bun run build:shared | |
| - name: 🌐 Install Playwright browsers | |
| working-directory: apps/frontend | |
| run: bunx playwright install --with-deps chromium | |
| - name: 🧪 E2E journeys | |
| working-directory: apps/frontend | |
| run: bun run test:e2e | |
| - name: 📤 Upload report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: apps/frontend/playwright-report/ | |
| retention-days: 7 | |
| # The dashboard runs its own Playwright config (own Vite server on 5174). Always run it, | |
| # even when the frontend journeys failed — one broken app should not hide the other's status. | |
| - name: 🌐 Install Playwright browsers (dashboard) | |
| if: always() | |
| working-directory: apps/dashboard | |
| run: bunx playwright install --with-deps chromium | |
| - name: 🧪 Dashboard E2E journeys | |
| if: always() | |
| working-directory: apps/dashboard | |
| run: bun run test:e2e | |
| - name: 📤 Upload dashboard report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report-dashboard | |
| path: apps/dashboard/playwright-report/ | |
| retention-days: 7 | |
| # Browser journeys mock the API and cannot detect deployment or upstream routing failures. | |
| # Probe both live environments through a cross-chain corridor so BUY and SELL exercise Squid. | |
| - name: 🩺 Live BUY/SELL quote smoke tests | |
| if: always() | |
| working-directory: apps/api | |
| env: | |
| VORTEX_QUOTE_SMOKE_URLS: https://api-staging.vortexfinance.co,https://api.vortexfinance.co | |
| run: bun test src/tests/deployed-quotes.e2e.test.ts | |
| # Non-blocking runs are only useful if somebody hears about failures. | |
| # Uses the same webhook token the backend's Slack notifier uses | |
| # (repo secret SLACK_WEB_HOOK_TOKEN); skips silently when unset. | |
| - name: 📣 Notify Slack on failure | |
| if: failure() | |
| env: | |
| SLACK_WEB_HOOK_TOKEN: ${{ secrets.SLACK_WEB_HOOK_TOKEN }} | |
| run: | | |
| if [ -z "$SLACK_WEB_HOOK_TOKEN" ]; then | |
| echo "SLACK_WEB_HOOK_TOKEN secret not configured; skipping notification." | |
| exit 0 | |
| fi | |
| curl -sf -X POST -H 'Content-Type: application/json' \ | |
| -d "{\"text\":\"Nightly Playwright e2e run failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \ | |
| "https://hooks.slack.com/services/${SLACK_WEB_HOOK_TOKEN}" |