ci(ci): refactored CI setup and test-state isolation for coding-agent workflows

- Added a setup-system-deps action with preloaded-runner guards and apt fallbacks.
- Updated CI workflows to download Linux x64 native artifacts and gate on native job success.
- Renamed coding-agent fast mode to singleton in scripts and test partitioning logic.
- Added settings test-state begin/restore helpers with recursive cleanup in affected tests.
This commit is contained in:
can1357
2026-06-14 22:37:05 +02:00
parent 932de0a1dd
commit b8e4da23d0
16 changed files with 325 additions and 232 deletions
@@ -1,5 +1,6 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "bun:test";
import type { RenderResultOptions } from "@oh-my-pi/pi-agent-core";
import type { SettingPath, SettingValue } from "@oh-my-pi/pi-coding-agent/config/settings";
import { resetSettingsForTest, Settings } from "@oh-my-pi/pi-coding-agent/config/settings";
import { getThemeByName, setThemeInstance } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
import { taskToolRenderer } from "@oh-my-pi/pi-coding-agent/task/render";
@@ -97,8 +98,12 @@ describe("task progress rendering", () => {
it("keeps the agent dot when shimmer is disabled", async () => {
const theme = (await getThemeByName("dark"))!;
resetSettingsForTest();
await Settings.init({ inMemory: true, overrides: { "display.shimmer": "disabled" } });
const settings = Settings.instance;
const readSetting: Settings["get"] = settings.get.bind(settings);
vi.spyOn(settings, "get").mockImplementation(<P extends SettingPath>(path: P): SettingValue<P> => {
if (path === "display.shimmer") return "disabled" as SettingValue<P>;
return readSetting(path);
});
const options: RenderResultOptions = { expanded: false, isPartial: true, spinnerFrame: 0 };
const strippedRow = Bun.stripANSI(