check.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. name: Check
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. jobs:
  10. lint:
  11. strategy:
  12. matrix:
  13. node_version: [18.x, 20.x, 22.x]
  14. os: [ubuntu-latest, windows-latest, macos-latest]
  15. fail-fast: false
  16. runs-on: ${{ matrix.os }}
  17. timeout-minutes: 10
  18. steps:
  19. - run: |
  20. git config --global core.autocrlf false
  21. git config --global core.eol lf
  22. - uses: actions/checkout@v4
  23. - uses: pnpm/action-setup@v4
  24. - uses: actions/setup-node@v4
  25. with:
  26. node-version: ${{ matrix.node_version }}
  27. cache: pnpm
  28. - run: pnpm i
  29. - run: pnpm run lint
  30. typecheck:
  31. strategy:
  32. matrix:
  33. node_version: [18.x, 20.x, 22.x]
  34. os: [ubuntu-latest, windows-latest, macos-latest]
  35. fail-fast: false
  36. runs-on: ${{ matrix.os }}
  37. timeout-minutes: 10
  38. steps:
  39. - run: |
  40. git config --global core.autocrlf false
  41. git config --global core.eol lf
  42. - uses: actions/checkout@v4
  43. - uses: pnpm/action-setup@v4
  44. - uses: actions/setup-node@v4
  45. with:
  46. node-version: ${{ matrix.node_version }}
  47. cache: pnpm
  48. - run: pnpm i
  49. - run: pnpm run type-check
  50. build:
  51. strategy:
  52. matrix:
  53. node_version: [18.x, 20.x, 22.x]
  54. os: [ubuntu-latest, windows-latest, macos-latest]
  55. build_cmd: [build, 'build:mp-weixin', 'build:app']
  56. fail-fast: false
  57. runs-on: ${{ matrix.os }}
  58. timeout-minutes: 10
  59. steps:
  60. - run: |
  61. git config --global core.autocrlf false
  62. git config --global core.eol lf
  63. - uses: actions/checkout@v4
  64. - uses: pnpm/action-setup@v4
  65. - uses: actions/setup-node@v4
  66. with:
  67. node-version: ${{ matrix.node_version }}
  68. cache: pnpm
  69. - run: pnpm i
  70. - run: pnpm run ${{ matrix.build_cmd }}