ci.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. name: CI
  2. on:
  3. pull_request:
  4. paths-ignore:
  5. - 'build/**'
  6. - 'docs/**'
  7. - 'files/**'
  8. permissions:
  9. contents: read
  10. jobs:
  11. test:
  12. name: Lint, Unit, Unit addons, Circular dependencies & Examples testing
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Git checkout
  16. uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
  17. - name: Install Node
  18. uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
  19. with:
  20. node-version: 22
  21. cache: 'npm'
  22. - name: Install dependencies
  23. run: npm ci
  24. - name: === Lint testing ===
  25. run: npm run lint
  26. - name: === Unit testing ===
  27. run: npm run test-unit
  28. - name: === Unit addons testing ===
  29. run: npm run test-unit-addons
  30. - name: === Circular dependencies testing ===
  31. run: npm run test-circular-deps
  32. - name: === Examples ready for release ===
  33. run: npm run test-e2e-cov
  34. e2e:
  35. name: E2E testing
  36. runs-on: ${{ matrix.os }}
  37. timeout-minutes: 20
  38. strategy:
  39. fail-fast: false
  40. matrix:
  41. os: [ windows-latest ]
  42. CI: [ 0, 1, 2, 3 ]
  43. env:
  44. CI: ${{ matrix.CI }}
  45. steps:
  46. - name: Git checkout
  47. uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
  48. - name: Install Node
  49. uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
  50. with:
  51. node-version: 22
  52. cache: 'npm'
  53. - name: Install dependencies
  54. run: npm ci
  55. - name: Build
  56. run: npm run build-module
  57. - name: === E2E testing ===
  58. run: npm run test-e2e
  59. - name: Upload output screenshots
  60. uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
  61. if: always()
  62. with:
  63. name: Output screenshots-${{ matrix.os }}-${{ matrix.CI }}
  64. path: test/e2e/output-screenshots
  65. if-no-files-found: ignore
粤ICP备19079148号