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