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