Update action.yml

This commit is contained in:
2025-08-23 16:09:46 +02:00
parent 1b3b95346f
commit 0d6fa66d57
+9 -17
View File
@@ -302,35 +302,27 @@ runs:
WRAP="${{ inputs.session-wrapper }} bash -c"
cat > run_all.sh <<'EOF'
cat > run_all.sh <<EOF
#!/bin/bash
set -x # trace chaque commande
exec >>"$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