diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0baf87fe..6f7453e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,8 +92,16 @@ jobs: run: cargo check --manifest-path src-tauri/Cargo.toml - name: Run Rust backend unit tests + if: runner.os != 'Windows' run: cargo test --manifest-path src-tauri/Cargo.toml --lib + - name: Compile Rust backend unit tests (Windows) + # Windows runner 能链接 lib test binary,但干净镜像缺少可选 native runtime + # DLL entrypoint 时,进程会在 test harness 启动前退出。这里保留 cfg/link + # 覆盖;共享单测在 macOS / Linux 上实际执行。 + if: runner.os == 'Windows' + run: cargo test --manifest-path src-tauri/Cargo.toml --lib --no-run + - name: Verify version sync across all 5 files # 两个平台都跑这个校验:Windows runner 自带 git-bash,跨 shell 表现一致。 # 一旦版本号 drift 立刻 fail,避免发版时再发现漏改。