mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
fix server-ci: install only claude-code, set SDK path in contract test
Two regressions from the previous CI install: - Installing opencode-ai globally in server-ci/server-tests caused opencode-agent.test.ts (gated on \`hasOpenCode\`) to start running for the first time and surface real but unrelated test breakage. Trim the install to claude-code, which is all that's needed for the Claude e2e tests that motivated the change. - claude-agent.integration.test.ts's supportedModels test calls the SDK's \`query()\` directly (bypassing ClaudeAgentClient) and didn't pass \`pathToClaudeCodeExecutable\`. The 0.2.71 SDK had a bundled cli.js fallback; 0.2.133 doesn't, so on Ubuntu CI it tries the per-platform binary path (\`...claude-agent-sdk-linux-x64-musl/claude\`) which isn't installed via the \`claude-code\` global. Resolve the binary explicitly in the test and pass it as the SDK option.
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -88,8 +88,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Install agent CLIs for provider tests
|
||||
run: npm install -g @anthropic-ai/claude-code @openai/codex@0.105.0 opencode-ai
|
||||
- name: Install Claude Code CLI for provider tests
|
||||
run: npm install -g @anthropic-ai/claude-code
|
||||
|
||||
- name: Build highlight dependency
|
||||
run: npm run build --workspace=@getpaseo/highlight
|
||||
|
||||
4
.github/workflows/server-ci.yml
vendored
4
.github/workflows/server-ci.yml
vendored
@@ -36,8 +36,8 @@ jobs:
|
||||
- name: Install server dependencies
|
||||
run: npm install --workspace=@getpaseo/server --include-workspace-root
|
||||
|
||||
- name: Install agent CLIs for provider tests
|
||||
run: npm install -g @anthropic-ai/claude-code @openai/codex@0.105.0 opencode-ai
|
||||
- name: Install Claude Code CLI for provider tests
|
||||
run: npm install -g @anthropic-ai/claude-code
|
||||
|
||||
- name: Build highlight dependency
|
||||
run: npm run build --workspace=@getpaseo/highlight
|
||||
|
||||
@@ -6,7 +6,7 @@ import pino from "pino";
|
||||
import { query, type SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
|
||||
|
||||
import type { AgentSession, AgentStreamEvent, ToolCallTimelineItem } from "../agent-sdk-types.js";
|
||||
import { isCommandAvailable } from "../../../utils/executable.js";
|
||||
import { findExecutable, isCommandAvailable } from "../../../utils/executable.js";
|
||||
import { withTimeout } from "../../../utils/promise-timeout.js";
|
||||
import { ClaudeAgentClient } from "./claude-agent.js";
|
||||
import { streamSession } from "./test-utils/session-stream-adapter.js";
|
||||
@@ -223,6 +223,8 @@ describe("ClaudeAgentSession integration", () => {
|
||||
}, 60_000);
|
||||
|
||||
test("supportedModels returns the current abstract Claude SDK model shape", async () => {
|
||||
const claudeBinary = await findExecutable("claude");
|
||||
if (!claudeBinary) throw new Error("claude binary required for this integration test");
|
||||
const claudeQuery = query({
|
||||
prompt: createEmptyPrompt(),
|
||||
options: {
|
||||
@@ -230,6 +232,7 @@ describe("ClaudeAgentSession integration", () => {
|
||||
permissionMode: "plan",
|
||||
includePartialMessages: false,
|
||||
settingSources: ["user", "project"],
|
||||
pathToClaudeCodeExecutable: claudeBinary,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user