ci.yml 2.1 KB

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