fix(ci): run cross-os checks on Windows

This commit is contained in:
Vincent Koc
2026-05-03 18:05:32 -07:00
parent 0362f64eac
commit c1db7df2ea
3 changed files with 36 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
const WORKFLOW_PATH = ".github/workflows/openclaw-cross-os-release-checks-reusable.yml";
const WRAPPER_PATH = "scripts/github/run-openclaw-cross-os-release-checks.sh";
const HARNESS = "bash workflow/scripts/github/run-openclaw-cross-os-release-checks.sh";
describe("cross-OS release checks workflow", () => {
@@ -11,4 +12,13 @@ describe("cross-OS release checks workflow", () => {
expect(workflow).toContain(HARNESS);
expect(workflow).not.toContain('pnpm dlx "tsx@${TSX_VERSION}"');
});
it("uses Windows-safe npm resolution for the TypeScript loader bootstrap", () => {
const wrapper = readFileSync(WRAPPER_PATH, "utf8");
expect(wrapper).toContain("command -v npm.cmd");
expect(wrapper).toContain('npm_tool_dir="$(cygpath -w "${tool_dir}")"');
expect(wrapper).toContain('"${npm_cmd}" install --prefix "${npm_tool_dir}"');
expect(wrapper).toContain('exec "${node_cmd}" --import "${loader_url}"');
});
});