浏览代码

test: skip LLM integration tests in CI

Model download + GPU inference won't work on CI runners.
Uses describe.skipIf(CI) for LlamaCpp Integration, LLM Session
Management, vector search, and deep search tests.
Tobi Lutke 3 月之前
父节点
当前提交
ed4df97122
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      src/llm.test.ts
  2. 2 2
      src/mcp.test.ts

+ 2 - 2
src/llm.test.ts

@@ -59,7 +59,7 @@ describe("LlamaCpp.modelExists", () => {
 // Integration Tests (require actual models)
 // =============================================================================
 
-describe("LlamaCpp Integration", () => {
+describe.skipIf(!!process.env.CI)("LlamaCpp Integration", () => {
   // Use the singleton to avoid multiple Metal contexts
   const llm = getDefaultLlamaCpp();
 
@@ -390,7 +390,7 @@ describe("LlamaCpp Integration", () => {
 // Session Management Tests
 // =============================================================================
 
-describe("LLM Session Management", () => {
+describe.skipIf(!!process.env.CI)("LLM Session Management", () => {
   describe("withLLMSession", () => {
     test("session provides access to LLM operations", async () => {
       const result = await withLLMSession(async (session) => {

+ 2 - 2
src/mcp.test.ts

@@ -294,7 +294,7 @@ describe("MCP Server", () => {
   // Tool: qmd_vector_search (Vector)
   // ===========================================================================
 
-  describe("qmd_vector_search tool", () => {
+  describe.skipIf(!!process.env.CI)("qmd_vector_search tool", () => {
     test("returns results for semantic query", async () => {
       const results = await searchVec(testDb, "project documentation", DEFAULT_EMBED_MODEL, 10);
       expect(results.length).toBeGreaterThan(0);
@@ -320,7 +320,7 @@ describe("MCP Server", () => {
   // Tool: qmd_deep_search (Deep search)
   // ===========================================================================
 
-  describe("qmd_deep_search tool", () => {
+  describe.skipIf(!!process.env.CI)("qmd_deep_search tool", () => {
     test("expands query with typed variations", async () => {
       const expanded = await expandQuery("api documentation", DEFAULT_QUERY_MODEL, testDb);
       // Returns ExpandedQuery[] — typed expansions, original excluded