mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 01:31:08 +00:00
ci: stabilize macOS and transcript policy tests
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -1095,7 +1095,9 @@ jobs:
|
||||
set -euo pipefail
|
||||
case "$TASK" in
|
||||
test)
|
||||
pnpm test
|
||||
# Linux owns the full repo test suite. Keep macOS CI focused on
|
||||
# launchd/Homebrew/runtime path coverage and the process-group wrapper.
|
||||
pnpm test:macos:ci
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported macOS node task: $TASK" >&2
|
||||
|
||||
@@ -1267,6 +1267,7 @@
|
||||
"test:live:media:music": "node --import tsx scripts/test-live-media.ts music",
|
||||
"test:live:media:video": "node --import tsx scripts/test-live-media.ts video",
|
||||
"test:live:models-profiles": "node scripts/test-live.mjs -- src/agents/models.profiles.live.test.ts",
|
||||
"test:macos:ci": "node scripts/test-projects.mjs src/daemon/launchd.test.ts src/daemon/runtime-paths.test.ts src/daemon/runtime-binary.test.ts src/infra/brew.test.ts src/infra/stable-node-path.test.ts test/scripts/vitest-process-group.test.ts",
|
||||
"test:max": "OPENCLAW_VITEST_MAX_WORKERS=8 node scripts/test-projects.mjs",
|
||||
"test:parallels:linux": "bash scripts/e2e/parallels-linux-smoke.sh",
|
||||
"test:parallels:macos": "bash scripts/e2e/parallels-macos-smoke.sh",
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
|
||||
vi.unmock("../plugins/provider-runtime.js");
|
||||
vi.unmock("../plugins/provider-runtime.runtime.js");
|
||||
vi.unmock("../plugins/providers.runtime.js");
|
||||
|
||||
let resolveTranscriptPolicy: typeof import("./transcript-policy.js").resolveTranscriptPolicy;
|
||||
const MISTRAL_PLUGIN_CONFIG = {
|
||||
plugins: {
|
||||
entries: {
|
||||
mistral: { enabled: true },
|
||||
},
|
||||
},
|
||||
} as OpenClawConfig;
|
||||
|
||||
beforeEach(async () => {
|
||||
vi.resetModules();
|
||||
vi.doUnmock("../plugins/provider-runtime.js");
|
||||
vi.doUnmock("../plugins/provider-runtime.runtime.js");
|
||||
vi.doUnmock("../plugins/providers.runtime.js");
|
||||
({ resolveTranscriptPolicy } = await import("./transcript-policy.js"));
|
||||
});
|
||||
|
||||
@@ -27,6 +38,7 @@ describe("resolveTranscriptPolicy e2e smoke", () => {
|
||||
const policy = resolveTranscriptPolicy({
|
||||
provider: "mistral",
|
||||
modelId: "mistral-large-latest",
|
||||
config: MISTRAL_PLUGIN_CONFIG,
|
||||
});
|
||||
expect(policy.sanitizeToolCallIds).toBe(true);
|
||||
expect(policy.toolCallIdMode).toBe("strict9");
|
||||
|
||||
Reference in New Issue
Block a user