Motivation
All current tests run offline (HashEmbedder + pattern extractor). The Ollama-backed path (OllamaClient, OllamaEmbedder, LLM entity extraction, LLM answer synthesis, and — once merged — LLM community summaries) has no automated coverage.
Scope
- Add an integration test that, only when an env var is set (e.g.
GRAPHRAG_OLLAMA_TESTS=1 + OLLAMA_HOST), builds a small graph with the Ollama backends and asserts ask / lightRAG().ask return non-empty, grounded answers.
- The test must skip cleanly (no failure) when the env var is unset, so default CI stays fully offline.
- Optional: a separate, manually-triggered CI job (
workflow_dispatch) that runs the Ollama tests against a service container.
Files (isolated)
Tests/GraphRAGTests/ (new OllamaIntegrationTests.swift), optionally .github/workflows/. No library source changes.
Acceptance criteria
- Default
swift test (no env var) skips the integration test and stays green with no network access.
- With the env var + a reachable Ollama, the test exercises the real LLM/embedding path.
- CI green.
Context: follow-up to PRs #2 / #3.
Motivation
All current tests run offline (
HashEmbedder+ pattern extractor). The Ollama-backed path (OllamaClient,OllamaEmbedder, LLM entity extraction, LLM answer synthesis, and — once merged — LLM community summaries) has no automated coverage.Scope
GRAPHRAG_OLLAMA_TESTS=1+OLLAMA_HOST), builds a small graph with the Ollama backends and assertsask/lightRAG().askreturn non-empty, grounded answers.workflow_dispatch) that runs the Ollama tests against a service container.Files (isolated)
Tests/GraphRAGTests/(newOllamaIntegrationTests.swift), optionally.github/workflows/. No library source changes.Acceptance criteria
swift test(no env var) skips the integration test and stays green with no network access.Context: follow-up to PRs #2 / #3.