ci.yml 963 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: CI
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. test:
  9. runs-on: macos-latest
  10. strategy:
  11. matrix:
  12. node-version: [20, 22]
  13. steps:
  14. - name: Checkout repository
  15. uses: actions/checkout@v4
  16. - name: Setup Node.js ${{ matrix.node-version }}
  17. uses: actions/setup-node@v4
  18. with:
  19. node-version: ${{ matrix.node-version }}
  20. cache: "npm"
  21. - name: Install dependencies
  22. run: npm ci
  23. - name: Run linter
  24. run: npm run lint
  25. - name: Type check
  26. run: npm run typecheck
  27. - name: Run tests with coverage
  28. run: npm run test:coverage
  29. - name: Upload coverage reports
  30. if: matrix.node-version == 22
  31. uses: codecov/codecov-action@v4
  32. with:
  33. files: ./coverage/lcov.info
  34. fail_ci_if_error: false
  35. continue-on-error: true
  36. - name: Build
  37. run: npm run build