From 54d656824226b5119ec9aaa9eef7809aa372dabb Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 27 Mar 2026 13:13:54 +0100 Subject: [PATCH] fix: update endpoint check script to differentiate between failures and slow endpoints --- .gitea/workflows/pr-endpoint-check.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/pr-endpoint-check.yml b/.gitea/workflows/pr-endpoint-check.yml index cd56ec6..39d8249 100644 --- a/.gitea/workflows/pr-endpoint-check.yml +++ b/.gitea/workflows/pr-endpoint-check.yml @@ -51,11 +51,17 @@ jobs: bash scripts/test-endpoints.sh http://localhost:5038 1000 2>&1 | tee /tmp/webzine_endpoint_output.txt EXIT_CODE=${PIPESTATUS[0]} - FAIL_COUNT=$(grep -cE "^\[(LENT|ÉCHEC)\]" /tmp/webzine_endpoint_output.txt 2>/dev/null || echo 0) - echo "failed=$FAIL_COUNT" >> "$GITHUB_OUTPUT" - echo "exit_code=$EXIT_CODE" >> "$GITHUB_OUTPUT" + # Count failures (but not slow endpoints as failures) + FAIL_COUNT=$(grep -cE "^\[ÉCHEC\]" /tmp/webzine_endpoint_output.txt 2>/dev/null || echo 0) + SLOW_COUNT=$(grep -cE "^\[LENT\]" /tmp/webzine_endpoint_output.txt 2>/dev/null || echo 0) - exit $EXIT_CODE + echo "failed=$FAIL_COUNT" >> "$GITHUB_OUTPUT" + echo "slow=$SLOW_COUNT" >> "$GITHUB_OUTPUT" + + # Only fail if there are actual failures + if [ $FAIL_COUNT -gt 0 ]; then + exit 1 + fi - name: Post performance report as PR comment if: always()