Переглянути джерело

test: skip all model-dependent tests in CI

Token-based chunking, vector search, hybrid search, and store
LlamaCpp integration tests all require model downloads.
Tobi Lutke 3 місяців тому
батько
коміт
73985a2aaa
2 змінених файлів з 4 додано та 4 видалено
  1. 2 2
      src/eval.test.ts
  2. 2 2
      src/store.test.ts

+ 2 - 2
src/eval.test.ts

@@ -152,7 +152,7 @@ describe("BM25 Search (FTS)", () => {
 // Vector Search Tests - Requires embedding model
 // =============================================================================
 
-describe("Vector Search", () => {
+describe.skipIf(!!process.env.CI)("Vector Search", () => {
   let store: ReturnType<typeof createStore>;
   let db: Database;
   let hasEmbeddings = false;
@@ -264,7 +264,7 @@ describe("Vector Search", () => {
 // Hybrid Search (RRF) Tests - Combines BM25 + Vector
 // =============================================================================
 
-describe("Hybrid Search (RRF)", () => {
+describe.skipIf(!!process.env.CI)("Hybrid Search (RRF)", () => {
   let store: ReturnType<typeof createStore>;
   let db: Database;
   let hasVectors = false;

+ 2 - 2
src/store.test.ts

@@ -636,7 +636,7 @@ describe("Document Chunking", () => {
   });
 });
 
-describe("Token-based Chunking", () => {
+describe.skipIf(!!process.env.CI)("Token-based Chunking", () => {
   test("chunkDocumentByTokens returns single chunk for small documents", async () => {
     const content = "This is a small document.";
     const chunks = await chunkDocumentByTokens(content, 900, 135);
@@ -2245,7 +2245,7 @@ describe("Integration", () => {
 // LlamaCpp Integration Tests (using real local models)
 // =============================================================================
 
-describe("LlamaCpp Integration", () => {
+describe.skipIf(!!process.env.CI)("LlamaCpp Integration", () => {
   test("searchVec returns empty when no vector index", async () => {
     const store = await createTestStore();
     const collectionName = await createTestCollection();