feat(core): expose viewer onError + add closeOnDoubleClick (1.4.0) #49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 9.12.0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: Install dependencies (skip sandbox until pack/ tgz is built) | |
| # sandbox-* 包用 file:..\..\.pack\react-zmage-X.Y.Z.tgz 引用 core, 但 .pack/ 在 | |
| # .gitignore 里 — CI fresh checkout 时不存在, 直接 frozen-lockfile install 会 ENOENT. | |
| # filter 排除 sandbox, root + core + home 的依赖能 frozen 校验并装上; | |
| # build job 不需要 sandbox; sandbox-matrix job 之后跑 `pnpm -w run check`, | |
| # 内部 build + pack 生成 .pack/ 后再 install (那时 sandbox 也能装上). | |
| run: pnpm install --frozen-lockfile --filter '!./packages/sandbox-*' | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Test | |
| run: pnpm test | |
| - name: Build | |
| run: pnpm build | |
| sandbox-matrix: | |
| # 验证 dist 产物在 React 17/18/19 下都能被真实消费 (npm pack -> 安装 -> tsc) | |
| needs: build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| react: [17, 18, 19] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 9.12.0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: Install dependencies (skip sandbox until pack/ tgz is built) | |
| # sandbox-* 包用 file:..\..\.pack\react-zmage-X.Y.Z.tgz 引用 core, 但 .pack/ 在 | |
| # .gitignore 里 — CI fresh checkout 时不存在, 直接 frozen-lockfile install 会 ENOENT. | |
| # filter 排除 sandbox, root + core + home 的依赖能 frozen 校验并装上; | |
| # build job 不需要 sandbox; sandbox-matrix job 之后跑 `pnpm -w run check`, | |
| # 内部 build + pack 生成 .pack/ 后再 install (那时 sandbox 也能装上). | |
| run: pnpm install --frozen-lockfile --filter '!./packages/sandbox-*' | |
| - name: Run check pipeline (build + pack + reinstall) | |
| run: pnpm -w run check | |
| - name: Run only matching React sandbox | |
| # check 已经跑过全部 sandbox; 这里再独立跑一遍, CI 输出按 React 版本分列, 方便定位回归 | |
| run: pnpm --filter react-zmage-sandbox-r${{ matrix.react }} run check |