Merge pull request #1137 from Jayydy/Frontend #94
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: Frontend CI | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| paths: | ||
| - "frontend/**" | ||
| jobs: | ||
| e2e-validation: | ||
| timeout-minutes: 15 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
| cache: "npm" | ||
| cache-dependency-path: frontend/package-lock.json | ||
| - name: Install Dependencies | ||
| run: npm ci | ||
| working-directory: ./frontend | ||
| - name: Run ESLint | ||
| run: npx eslint . --max-warnings 0 | ||
| working-directory: ./frontend | ||
| - name: Install Playwright Browsers | ||
| run: npx playwright install --with-deps | ||
| working-directory: ./frontend | ||
| - name: Run E2E Tests | ||
| uses: nick-invision/retry@v2 | ||
| with: | ||
| timeout_minutes: 15 | ||
| max_attempts: 3 | ||
| command: npx playwright test | ||
| working-directory: ./frontend | ||
| - name: Upload Report | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: playwright-report | ||
| path: frontend/playwright-report/ | ||
| retention-days: 30 | ||