RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Refactor: enahnce CI (#15147)
Wang Qif4e63ef33fd0
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 29fbc58867..f14cf502cd 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -233,20 +233,40 @@ jobs:- name: Run sdk tests against Infinityrun: |export http_proxy=""; export https_proxy=""; export no_proxy=""; export HTTP_PROXY=""; export HTTPS_PROXY=""; export NO_PROXY=""- until sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/v1/system/ping > /dev/null 2>&1; do- echo "Waiting for service to be available... (last exit code: $?)"+ svc_ready=0+ for i in $(seq 1 60); do+ if sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/api/v1/system/ping > /dev/null 2>&1; then+ svc_ready=1+ break+ fi+ echo "Waiting for service to be available... ($i/120)"sleep 5done+ if [ "$svc_ready" -ne 1 ]; then+ echo "Service did not become ready after 5 minutes. Docker logs:"+ sudo docker logs ${RAGFLOW_CONTAINER}+ exit 1+ fiecho "Start to run test sdk on Infinity"source .venv/bin/activate && set -o pipefail; DOC_ENGINE=infinity pytest -s --tb=short --level=${HTTP_API_TEST_LEVEL} --junitxml=pytest-infinity-sdk.xml --cov=sdk/python/ragflow_sdk --cov-branch --cov-report=xml:coverage-infinity-sdk.xml test/testcases/test_sdk_api 2>&1 | tee infinity_sdk_test.log- name: Run New RESTFUL api tests against Infinityrun: |export http_proxy=""; export https_proxy=""; export no_proxy=""; export HTTP_PROXY=""; export HTTPS_PROXY=""; export NO_PROXY=""- until sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/v1/system/ping > /dev/null 2>&1; do- echo "Waiting for service to be available... (last exit code: $?)"+ svc_ready=0+ for i in $(seq 1 60); do+ if sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/api/v1/system/ping > /dev/null 2>&1; then+ svc_ready=1+ break+ fi+ echo "Waiting for service to be available... ($i/120)"sleep 5done+ if [ "$svc_ready" -ne 1 ]; then+ echo "Service did not become ready after 5 minutes. Docker logs:"+ sudo docker logs ${RAGFLOW_CONTAINER}+ exit 1+ fisource .venv/bin/activate && set -o pipefail; DOC_ENGINE=infinity pytest -s --tb=short --level=${HTTP_API_TEST_LEVEL} test/testcases/restful_api 2>&1 | tee infinity_restful_api_test.log- name: RAGFlow CLI retrieval test Infinity@@ -309,10 +329,20 @@ jobs:ADMIN_HOST="${USER_HOST}"ADMIN_PORT="${ADMIN_SVR_HTTP_PORT}"- until sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/v1/system/ping > /dev/null 2>&1; do- echo "Waiting for service to be available... (last exit code: $?)"+ svc_ready=0+ for i in $(seq 1 60); do+ if sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/api/v1/system/ping > /dev/null 2>&1; then+ svc_ready=1+ break+ fi+ echo "Waiting for service to be available... ($i/120)"sleep 5done+ if [ "$svc_ready" -ne 1 ]; then+ echo "Service did not become ready after 5 minutes. Docker logs:"+ sudo docker logs ${RAGFLOW_CONTAINER}+ exit 1+ fiadmin_ready=0for i in $(seq 1 30); do@@ -417,20 +447,40 @@ jobs:- name: Run sdk tests against Elasticsearchrun: |export http_proxy=""; export https_proxy=""; export no_proxy=""; export HTTP_PROXY=""; export HTTPS_PROXY=""; export NO_PROXY=""- until sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/v1/system/ping > /dev/null 2>&1; do- echo "Waiting for service to be available... (last exit code: $?)"+ svc_ready=0+ for i in $(seq 1 60); do+ if sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/api/v1/system/ping > /dev/null 2>&1; then+ svc_ready=1+ break+ fi+ echo "Waiting for service to be available... ($i/120)"sleep 5done+ if [ "$svc_ready" -ne 1 ]; then+ echo "Service did not become ready after 5 minutes. Docker logs:"+ sudo docker logs ${RAGFLOW_CONTAINER}+ exit 1+ fiecho "Start to run test sdk on Elasticsearch"source .venv/bin/activate && set -o pipefail; pytest -s --tb=short --level=${HTTP_API_TEST_LEVEL} --junitxml=pytest-infinity-sdk.xml --cov=sdk/python/ragflow_sdk --cov-branch --cov-report=xml:coverage-es-sdk.xml test/testcases/test_sdk_api 2>&1 | tee es_sdk_test.log- name: Run New RESTFUL api tests against Elasticsearchrun: |export http_proxy=""; export https_proxy=""; export no_proxy=""; export HTTP_PROXY=""; export HTTPS_PROXY=""; export NO_PROXY=""- until sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/v1/system/ping > /dev/null 2>&1; do- echo "Waiting for service to be available... (last exit code: $?)"+ svc_ready=0+ for i in $(seq 1 60); do+ if sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/api/v1/system/ping > /dev/null 2>&1; then+ svc_ready=1+ break+ fi+ echo "Waiting for service to be available... ($i/120)"sleep 5done+ if [ "$svc_ready" -ne 1 ]; then+ echo "Service did not become ready after 5 minutes. Docker logs:"+ sudo docker logs ${RAGFLOW_CONTAINER}+ exit 1+ fisource .venv/bin/activate && set -o pipefail; pytest -s --tb=short --level=${HTTP_API_TEST_LEVEL} test/testcases/restful_api 2>&1 | tee es_restful_api_test.log- name: RAGFlow CLI retrieval test Elasticsearch@@ -493,10 +543,20 @@ jobs:ADMIN_HOST="${USER_HOST}"ADMIN_PORT="${ADMIN_SVR_HTTP_PORT}"- until sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/v1/system/ping > /dev/null 2>&1; do- echo "Waiting for service to be available... (last exit code: $?)"+ svc_ready=0+ for i in $(seq 1 60); do+ if sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/api/v1/system/ping > /dev/null 2>&1; then+ svc_ready=1+ break+ fi+ echo "Waiting for service to be available... ($i/120)"sleep 5done+ if [ "$svc_ready" -ne 1 ]; then+ echo "Service did not become ready after 5 minutes. Docker logs:"+ sudo docker logs ${RAGFLOW_CONTAINER}+ exit 1+ fiadmin_ready=0for i in $(seq 1 30); do