From 8181bc28d22b799a7d538e7f158d7d1cd6c281a2 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Mon, 25 Aug 2025 11:16:37 +0200 Subject: [PATCH] Update action.yml --- action.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 92987ed..b8e61d4 100644 --- a/action.yml +++ b/action.yml @@ -302,18 +302,24 @@ runs: chmod +x custom_cmd.sh export CMD - ./custom_cmd.sh + ./custom_cmd.sh 2>&1 | tee outputs/pytest-output.log echo "▶️ END" - awk '/=+ test session starts =+/{flag=1} /-+ JSON report -+/{flag=0} flag' outputs/test-ci.log > outputs/raw-test-output.log - awk '/=+ short test summary info =+/,/=+.* in .*s =+/' outputs/test-ci.log > outputs/short-test-output.log + awk '/=+ test session starts =+/{flag=1} /-+ JSON report -+/{flag=0} flag' outputs/pytest-output.log > outputs/raw-test-output.log + awk '/=+ short test summary info =+/,/=+.* in .*s =+/' outputs/test-ci.log > outputs/pytest-output.log set -e echo "" >> $LOG_FILE - echo "📋 Short test summary:" >> $LOG_FILE - cat outputs/short-test-output.log >> $LOG_FILE || true + echo "📋 Short test summary:" >> "$LOG_FILE" + if [ -s outputs/short-test-output.log ]; then + cat outputs/short-test-output.log >> "$LOG_FILE" + else + echo "✅ All tests passed, nothing to report." >> "$LOG_FILE" + fi + + cat outputs/pytest-output.log mkdir -p markdown