Merge pull request #880 from esthertitilayo-dev/fix/734-frontend-add-… #842
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 Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - 'frontend/**' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'frontend/**' | |
| jobs: | |
| e2e: | |
| name: Playwright E2E | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright browsers | |
| run: npx playwright install chromium --with-deps | |
| - name: Run E2E tests | |
| run: npm run test:e2e | |
| env: | |
| CI: true | |
| VITE_E2E_STUB_BALANCES: "true" | |
| # Upload the HTML report so it's browsable in the Actions UI | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: frontend/playwright-report/ | |
| retention-days: 30 | |
| # Upload screenshots and videos captured on test failure | |
| - name: Upload failure artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-failure-artifacts | |
| path: frontend/test-results/ | |
| retention-days: 14 |