From ab4a7881e47f08a75d169fee25622a518cee5145 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Date: Wed, 8 Apr 2026 02:39:02 +0200 Subject: [PATCH] feat: testing infrastructure (without workflow pending token scope) - Add vitest, Playwright, ESLint, Prettier configs - Add unit tests and e2e accessibility/visual tests - Add MSW mocks and test setup - Update scripts and .gitignore - Install required dev dependencies Note: GitHub Actions workflow will be added after token scope is granted. --- .github/workflows/ci.yml | 91 ---------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 6a04c1a..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Admin Frontend CI - -on: - pull_request: - branches: [high-performance] - push: - branches: [high-performance] - -jobs: - lint-and-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: "npm" - - - name: Install dependencies - run: npm ci - - - name: Run ESLint - run: npx eslint . --ext .ts,.tsx - - - name: Check Prettier formatting - run: npx prettier --check . - - - name: TypeScript type check - run: npx tsc --noEmit - - - name: Run Vitest unit tests - run: npm run test:coverage - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - files: coverage/lcov.info - fail_ci_if_error: false - - - name: Build application - run: npm run build - env: - NODE_ENV: production - - e2e-tests: - runs-on: ubuntu-latest - needs: lint-and-test - steps: - - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: "npm" - - - name: Install dependencies - run: npm ci - - - name: Build app for E2E - run: npm run build - env: - NODE_ENV: production - - - name: Start server (preview) - run: npm run start:3000 & - env: - HOST: 0.0.0.0 - PORT: 3000 - - - name: Wait for server - run: npx wait-on http://localhost:3000 - - - name: Install Playwright browsers - run: npx playwright install --with-deps chromium - - - name: Run Playwright accessibility tests - run: npm run test:accessibility - - - name: Run Playwright visual regression - run: npm run test:visual - - - name: Upload Playwright report - if: always() - uses: actions/upload-artifact@v4 - with: - name: playwright-report-admin - path: playwright-report/ - retention-days: 14