mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Speed up server CI tests (#2537)
* perf(ci): reduce server test latency Server test files use isolated resources, so they do not require suite-wide serialization. * fix(ci): scope server test parallelism to unit suite Keep real-provider and local-resource suites serialized because they may share user configuration and account limits. * fix(terminal): isolate zsh runtimes by process Prevent concurrent daemon and test processes from deleting or replacing shell integration files used by another process. * fix(ci): preserve required matrix check names GitHub evaluates job conditions before expanding a matrix. Expand active matrices first and gate their expensive steps so required check contexts are always reported. Allow superseded runs to cancel while retaining fail-open path detection.
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
"speech:download": "tsx scripts/download-speech-models.ts",
|
||||
"speech:transcribe:local": "tsx scripts/transcribe-local-wav.ts",
|
||||
"test": "npm run test:unit && npm run test:integration",
|
||||
"test:unit": "vitest run --exclude \"**/*.e2e.test.ts\"",
|
||||
"test:unit": "vitest run --fileParallelism --exclude \"**/*.e2e.test.ts\"",
|
||||
"test:integration": "vitest run --maxWorkers=1 src/server/daemon-e2e/models.e2e.test.ts src/server/daemon-e2e/live-preferences.e2e.test.ts src/server/agent/model-catalog.e2e.test.ts",
|
||||
"test:integration:all": "npm run test:e2e",
|
||||
"test:integration:real": "vitest run real.e2e.test.ts",
|
||||
|
||||
@@ -253,7 +253,7 @@ function lastNonEmptyLineIsPrompt(state: ReturnType<TerminalSession["getState"]>
|
||||
}
|
||||
|
||||
function removeZshShellIntegrationRuntimeDir(): void {
|
||||
rmSync(join(tmpdir(), `${userInfo().username || "unknown"}-paseo-zsh`), {
|
||||
rmSync(join(tmpdir(), `${userInfo().username || "unknown"}-paseo-zsh-${process.pid}`), {
|
||||
recursive: true,
|
||||
force: true,
|
||||
});
|
||||
@@ -272,7 +272,9 @@ describe.skipIf(isPlatform("win32"))("terminal POSIX-only", () => {
|
||||
expect(resolvedEnv.TERM).toBe("xterm-256color");
|
||||
expect(resolvedEnv.TERM_PROGRAM).toBe("kitty");
|
||||
expect(resolvedEnv.PASEO_ZSH_ZDOTDIR).toBe("/tmp/paseo-zdotdir");
|
||||
expect(resolvedEnv.ZDOTDIR).not.toBe("/tmp/paseo-zdotdir");
|
||||
expect(resolvedEnv.ZDOTDIR).toBe(
|
||||
join(tmpdir(), `${userInfo().username || "unknown"}-paseo-zsh-${process.pid}`),
|
||||
);
|
||||
expect(existsSync(join(resolvedEnv.ZDOTDIR, ".zshenv"))).toBe(true);
|
||||
expect(existsSync(join(resolvedEnv.ZDOTDIR, "paseo-integration.zsh"))).toBe(true);
|
||||
});
|
||||
|
||||
@@ -384,7 +384,7 @@ function resolveZshShellIntegrationRuntimeDir(): string {
|
||||
} catch {
|
||||
// keep fallback
|
||||
}
|
||||
return join(tmpdir(), `${username}-paseo-zsh`);
|
||||
return join(tmpdir(), `${username}-paseo-zsh-${process.pid}`);
|
||||
}
|
||||
|
||||
function prepareZshShellIntegrationRuntimeDir(sourceDir = resolveZshShellIntegrationDir()): string {
|
||||
|
||||
Reference in New Issue
Block a user