ci.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: CI
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. concurrency:
  8. group: ci-${{ github.ref }}
  9. cancel-in-progress: true
  10. jobs:
  11. check:
  12. name: Lint, Typecheck & Unit Tests
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v4
  16. - uses: pnpm/action-setup@v4
  17. - uses: actions/setup-node@v4
  18. with:
  19. node-version: 22
  20. cache: pnpm
  21. - run: pnpm install --frozen-lockfile
  22. - name: Prettier
  23. run: pnpm check
  24. - name: ESLint
  25. run: pnpm lint
  26. - name: TypeScript
  27. run: npx tsc --noEmit
  28. - name: Unit Tests
  29. run: pnpm test
  30. e2e:
  31. name: E2E Tests
  32. runs-on: ubuntu-latest
  33. steps:
  34. - uses: actions/checkout@v4
  35. - uses: pnpm/action-setup@v4
  36. - uses: actions/setup-node@v4
  37. with:
  38. node-version: 22
  39. cache: pnpm
  40. - run: pnpm install --frozen-lockfile
  41. - name: Install Playwright browsers
  42. run: pnpm exec playwright install chromium --with-deps
  43. - name: Run e2e tests
  44. run: pnpm exec playwright test
  45. - uses: actions/upload-artifact@v4
  46. if: failure()
  47. with:
  48. name: playwright-report
  49. path: playwright-report/
  50. retention-days: 7