feat: add SWR local storage cache layer for offline dashboard resiliency (#2801) #4337
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 | |
| on: | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| concurrency: | |
| group: e2e-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| playwright: | |
| name: Playwright smoke tests | |
| runs-on: ubuntu-latest | |
| env: | |
| NEXTAUTH_SECRET: test-nextauth-secret-for-playwright-tests | |
| NEXTAUTH_URL: http://127.0.0.1:3002 | |
| NEXT_PUBLIC_APP_URL: http://127.0.0.1:3002 | |
| GITHUB_ID: playwright-github-id | |
| GITHUB_SECRET: playwright-github-secret | |
| NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }} | |
| NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }} | |
| SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
| PLAYWRIGHT_SERVER_MODE: start | |
| CI: true | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup pnpm | |
| run: corepack enable && corepack prepare pnpm@11.12.0 --activate | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install app dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Next.js app | |
| run: | | |
| cat <<EOF > .env.production | |
| NEXTAUTH_SECRET=test-nextauth-secret-for-playwright-tests | |
| NEXTAUTH_URL=http://127.0.0.1:3002 | |
| NEXT_PUBLIC_APP_URL=http://127.0.0.1:3002 | |
| GITHUB_ID=playwright-github-id | |
| GITHUB_SECRET=playwright-github-secret | |
| NEXT_PUBLIC_SUPABASE_URL=${{ secrets.NEXT_PUBLIC_SUPABASE_URL }} | |
| NEXT_PUBLIC_SUPABASE_ANON_KEY=${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }} | |
| SUPABASE_SERVICE_ROLE_KEY=${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
| PLAYWRIGHT_SERVER_MODE=start | |
| GITHUB_WEBHOOK_SECRET=ci-placeholder-webhook-secret | |
| EOF | |
| pnpm run build | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run Playwright tests | |
| run: npx playwright test | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 |