Add end-to-end integration test workflow #2412
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds a full end-to-end integration testing setup for LightRAG.
It introduces a GitHub Actions workflow, a dedicated integration environment, a mock OpenAI-compatible server, and a sample C++ repository that together exercise the LightRAG HTTP API (indexing, querying, and graph retrieval) against realistic data and backend services (Redis, Neo4j, Milvus).
Related Issues
(Update this section with issue links if you have a tracking ticket.)
Changes Made
GitHub CI / Docs
.github/workflows/integration-test.yml:push,pull_request, andworkflow_dispatch.lightrag-hku[api]plus core test dependencies.docker composewithtests/docker-compose.integration.ymlto bring up Redis, Neo4j, and Milvus.lightrag-server, then runstests/integration_test.py..github/INTEGRATION_TEST_SETUP.mddocumenting how the integration environment works and how to run it.Server / tokenizer support
lightrag/api/lightrag_server.pyto optionally use a simple offline tokenizer whenLIGHTRAG_OFFLINE_TOKENIZER=true:tests/simple_tokenizer.py(if present) and passes a custom tokenizer intoLightRAG.Integration environment configuration
tests/.env.integration:tests/docker-compose.integration.yml:Integration test harness and fixtures
tests/integration_test.py:IntegrationTestRunnerusinghttpx.AsyncClient./healthendpoint.tests/sample_cpp_repo), including all*.cpp/*.hfiles and the README./query,/query/data, and/graph/dataacross multiple modes (naive, local, global, hybrid).tests/mock_openai_server.py:/healthendpoint for readiness checks.tests/sample_cpp_repo:calculator.*,utils.*,main.cpp,README.md) used as realistic source material for indexing and code-oriented queries.tests/simple_tokenizer.py:LIGHTRAG_OFFLINE_TOKENIZERflag.tests/start_server_offline.py:.env.integrationsettings and Docker services.Checklist
(Run the integration workflow locally or via GitHub Actions and mark this once verified.)
(To be checked after maintainer / peer review.)
-
.github/INTEGRATION_TEST_SETUP.mdadded; update any external docs if needed.- This PR focuses on integration tests rather than new unit tests.
Additional Notes