From 0d6fa66d578cb130302ca6e9793e6cbecd0cdfee Mon Sep 17 00:00:00 2001 From: tligui_y Date: Sat, 23 Aug 2025 16:09:46 +0200 Subject: [PATCH] Update action.yml --- action.yml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/action.yml b/action.yml index 2cdc8d7..7fee130 100644 --- a/action.yml +++ b/action.yml @@ -302,35 +302,27 @@ runs: WRAP="${{ inputs.session-wrapper }} bash -c" - cat > run_all.sh <<'EOF' + cat > run_all.sh <>"$LOG_FILE" 2>&1 # tout va dans le log + set -e + set -x + exec >>"$LOG_FILE" 2>&1 echo "⚡ Running tests and generating reports..." # PRE - if [ -n "${{ inputs.pre-test-cmd }}" ]; then - echo "▶️ Running pre-test commands..." - eval "${{ inputs.pre-test-cmd }}" - fi + ${{ inputs.pre-test-cmd }} # MAIN echo "⏩ Running tests..." - test_cmd="${{ inputs.test-run-cmd }}" - if [[ -n "$test_cmd" ]]; then - # Au lieu de eval, exécutez-la en tant que commande bash - bash -c "$test_cmd" + if [ -n "${{ inputs.test-run-cmd }}" ]; then + ${{ inputs.test-run-cmd }} else $CMD fi - + # POST - if [ -n "${{ inputs.post-test-cmd }}" ]; then - echo "🧹 Running post-test commands..." - eval "${{ inputs.post-test-cmd }}" - fi + ${{ inputs.post-test-cmd }} echo "▶️ END" EOF