ci.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
  17. - name: Install Node
  18. uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
  19. with:
  20. node-version: 24
  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: === 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: 30
  36. strategy:
  37. fail-fast: false
  38. matrix:
  39. os: [ ubuntu-latest ]
  40. CI: [ 0, 1, 2, 3, 4 ]
  41. env:
  42. CI: ${{ matrix.CI }}
  43. steps:
  44. - name: Git checkout
  45. uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
  46. - name: Install Node
  47. uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
  48. with:
  49. node-version: 24
  50. cache: 'npm'
  51. - name: Install Vulkan drivers and xvfb
  52. run: |
  53. sudo apt-get update
  54. sudo apt-get install -y mesa-vulkan-drivers xvfb
  55. - name: Install dependencies
  56. run: npm ci
  57. - name: Build
  58. run: npm run build-module
  59. - name: === E2E testing ===
  60. run: xvfb-run -a npm run test-e2e
  61. - name: Upload output screenshots
  62. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
  63. if: always()
  64. with:
  65. name: Output screenshots-${{ matrix.os }}-${{ matrix.CI }}
  66. path: test/e2e/output-screenshots
  67. if-no-files-found: ignore
粤ICP备19079148号