ci.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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, Circular dependencies & Examples testing
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Git checkout
  16. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  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: === Circular dependencies testing ===
  29. run: npm run test-circular-deps
  30. - name: === Examples ready for release ===
  31. run: npm run test-e2e-cov
  32. e2e:
  33. name: E2E testing
  34. runs-on: ${{ matrix.os }}
  35. timeout-minutes: 20
  36. strategy:
  37. fail-fast: false
  38. matrix:
  39. os: [ windows-latest ]
  40. CI: [ 0, 1, 2, 3 ]
  41. env:
  42. CI: ${{ matrix.CI }}
  43. steps:
  44. - name: Git checkout
  45. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  46. - name: Install Node
  47. uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
  48. with:
  49. node-version: 22
  50. cache: 'npm'
  51. - name: Install dependencies
  52. run: npm ci
  53. - name: Build
  54. run: npm run build-module
  55. - name: === E2E testing ===
  56. run: npm run test-e2e
  57. - name: Upload output screenshots
  58. uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
  59. if: always()
  60. with:
  61. name: Output screenshots-${{ matrix.os }}-${{ matrix.CI }}
  62. path: test/e2e/output-screenshots
  63. if-no-files-found: ignore
粤ICP备19079148号