test: add unit tests for repoAnalytics module #2509
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:3000 | |
| NEXT_PUBLIC_APP_URL: http://127.0.0.1:3000 | |
| GITHUB_ID: playwright-github-id | |
| GITHUB_SECRET: playwright-github-secret | |
| NEXT_PUBLIC_SUPABASE_URL: https://placeholder.supabase.co | |
| NEXT_PUBLIC_SUPABASE_ANON_KEY: placeholder-anon-key | |
| SUPABASE_SERVICE_ROLE_KEY: placeholder-service-role-key | |
| PLAYWRIGHT_SERVER_MODE: start | |
| CI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install app dependencies | |
| run: npm ci | |
| - name: Build Next.js app | |
| run: npm 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 |