Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

CI: Fix log tee failure (#21791)

maoyifeng293ad720b128
diff --git a/.github/workflows/sep-tests.yml b/.github/workflows/sep-tests.yml
index b82265b668..fb6d35d0e1 100644
--- a/.github/workflows/sep-tests.yml
+++ b/.github/workflows/sep-tests.yml
@@ -688,7 +688,15 @@ jobs:
export GOMODCACHE="${RUNNER_WORKSPACE_PREFIX}/gomodcache"
export GOCACHE="${RUNNER_WORKSPACE_PREFIX}/gobuild"
fi
+ mkdir -p "${ARTIFACTS_DIR}"
+ # Decouple the test result from the log tee: if tee fails (e.g. the
+ # artifacts dir is missing or NFS hiccups), the step must still reflect
+ # the real test outcome, not the tee failure.
+ set +eo pipefail
./build.sh --test-integration-go -timeout 60m ./test/api 2>&1 | tee "${ARTIFACTS_DIR}/infinity_go_api_test.log"
+ TEST_RC=${PIPESTATUS[0]}
+ set -eo pipefail
+ exit ${TEST_RC}
- name: Run Python SDK integration tests
if: ${{ env.HAS_GO == 'true' }}
@@ -698,7 +706,13 @@ jobs:
set -euo pipefail
export http_proxy="" https_proxy="" no_proxy="" HTTP_PROXY="" HTTPS_PROXY="" NO_PROXY=""
uv pip install sdk/python
+ mkdir -p "${ARTIFACTS_DIR}"
+ # Decouple the test result from the log tee (see Go API step above).
+ set +eo pipefail
uv run --no-sync python -m pytest -s --tb=short --level=p2 test/testcases/test_sdk_api 2>&1 | tee "${ARTIFACTS_DIR}/infinity_sdk_test.log"
+ TEST_RC=${PIPESTATUS[0]}
+ set -eo pipefail
+ exit ${TEST_RC}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
@@ -1259,7 +1273,15 @@ jobs:
export GOMODCACHE="${RUNNER_WORKSPACE_PREFIX}/gomodcache"
export GOCACHE="${RUNNER_WORKSPACE_PREFIX}/gobuild"
fi
+ mkdir -p "${ARTIFACTS_DIR}"
+ # Decouple the test result from the log tee: if tee fails (e.g. the
+ # artifacts dir is missing or NFS hiccups), the step must still reflect
+ # the real test outcome, not the tee failure.
+ set +eo pipefail
./build.sh --test-integration-go -timeout 60m ./test/api 2>&1 | tee "${ARTIFACTS_DIR}/es_go_api_test.log"
+ TEST_RC=${PIPESTATUS[0]}
+ set -eo pipefail
+ exit ${TEST_RC}
- name: Run Python SDK integration tests
if: ${{ env.HAS_GO == 'true' }}
@@ -1269,7 +1291,13 @@ jobs:
set -euo pipefail
export http_proxy="" https_proxy="" no_proxy="" HTTP_PROXY="" HTTPS_PROXY="" NO_PROXY=""
uv pip install sdk/python
+ mkdir -p "${ARTIFACTS_DIR}"
+ # Decouple the test result from the log tee (see Go API step above).
+ set +eo pipefail
uv run --no-sync python -m pytest -s --tb=short --level=p2 test/testcases/test_sdk_api 2>&1 | tee "${ARTIFACTS_DIR}/es_sdk_test.log"
+ TEST_RC=${PIPESTATUS[0]}
+ set -eo pipefail
+ exit ${TEST_RC}
- name: Collect ragflow log Elasticsearch
if: ${{ !cancelled() }}