feat: améliorer le format du rapport de performance en ajustant l'indentation et la structure du corps du message

This commit is contained in:
mirage
2026-03-27 10:53:07 +01:00
parent e012bc4dbd
commit d081f4f58a

View File

@@ -95,34 +95,34 @@ jobs:
fi
BODY=$(cat <<EOF
$HEADER
$INTRO
### Rapport complet des tests :
$FORMATTED_REPORT
---
$HEADER
$INTRO
### Rapport complet des tests :
$FORMATTED_REPORT
---
**Statut**: $STATUS
**Seuil**: 1000ms
**Vérifié par**: Workflow PR Endpoint Performance
EOF
)
curl -s -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg body "$BODY" '{body: $body}')" \
"$GITEA_SERVER_URL/api/v1/repos/$REPO/issues/$PR_NUMBER/comments"
**Vérifié par**: Workflow PR Endpoint Performance
EOF
)
curl -s -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg body "$BODY" '{body: $body}')" \
"$GITEA_SERVER_URL/api/v1/repos/$REPO/issues/$PR_NUMBER/comments"
- name: Enforce performance gate
if: always()
run: |
FAILED="${{ steps.perf_test.outputs.failed }}"
if [ "${FAILED:-0}" -gt 0 ]; then
echo "❌ PR REJETÉE : ${FAILED} endpoint(s) n'ont pas respecté le seuil d'une seconde."
exit 1
else
echo "✅ Tous les endpoints ont passé le contrôle de performance."
fi
- name: Enforce performance gate
if: always()
run: |
FAILED="${{ steps.perf_test.outputs.failed }}"
if [ "${FAILED:-0}" -gt 0 ]; then
echo "❌ PR REJETÉE : ${FAILED} endpoint(s) n'ont pas respecté le seuil d'une seconde."
exit 1
else
echo "✅ Tous les endpoints ont passé le contrôle de performance."
fi