Update .gitea/workflows/test.yml
Run Pytest with HTML and XML Test Reports / tests (push) Successful in 39s
Run Pytest with HTML and XML Test Reports / tests (push) Successful in 39s
This commit is contained in:
+32
-28
@@ -215,8 +215,40 @@ jobs:
|
||||
cd wiki
|
||||
git config user.name "ci-bot"
|
||||
git config user.email "ci-bot@example.com"
|
||||
|
||||
# Mettre à jour Home.md AVANT d'ajouter/committer
|
||||
HOME_FILE="Home.md"
|
||||
SHORT_SHA=$(git rev-parse --short HEAD)
|
||||
|
||||
TEST_LINK="* [Test Report #${GITHUB_RUN_NUMBER}](run-${GITHUB_RUN_NUMBER}-TEST-REPORT-commit:-${SHORT_SHA}.md)"
|
||||
COVERAGE_LINK="* [Coverage #${GITHUB_RUN_NUMBER}](run-${GITHUB_RUN_NUMBER}-COVERAGE-FILE-commit:-${SHORT_SHA}.md)"
|
||||
|
||||
TMP_FILE=".Home.tmp"
|
||||
|
||||
if [ ! -f "$HOME_FILE" ]; then
|
||||
echo "# 📘 Summary of Test Runs" > "$HOME_FILE"
|
||||
echo "" >> "$HOME_FILE"
|
||||
fi
|
||||
|
||||
{
|
||||
echo "$TEST_LINK"
|
||||
echo "$COVERAGE_LINK"
|
||||
echo ""
|
||||
cat "$HOME_FILE"
|
||||
} > "$TMP_FILE"
|
||||
|
||||
mv "$TMP_FILE" "$HOME_FILE"
|
||||
|
||||
echo "✅ Home.md updated"
|
||||
|
||||
# Afficher l'état git avant l'ajout pour debug
|
||||
git status
|
||||
|
||||
# Ajouter Home.md explicitement + tous les autres fichiers
|
||||
git add "$HOME_FILE"
|
||||
git add .
|
||||
|
||||
# Commit avec message
|
||||
COMMIT_MSG="Add wiki reports for ${{ steps.info.outputs.short_sha }} ${{ steps.info.outputs.commit_num }}"
|
||||
git commit -m "$COMMIT_MSG" || echo "⚠️ Nothing to commit"
|
||||
|
||||
@@ -228,34 +260,6 @@ jobs:
|
||||
}
|
||||
|
||||
echo "✅ Wiki reports pushed"
|
||||
echo ""
|
||||
echo "📘 Updating Home.md..."
|
||||
|
||||
HOME_FILE="Home.md"
|
||||
SHORT_SHA=$(git rev-parse --short HEAD)
|
||||
|
||||
TEST_LINK="* [Test Report #${GITHUB_RUN_NUMBER}](run-${GITHUB_RUN_NUMBER}-TEST-REPORT-commit:-${SHORT_SHA}.md)"
|
||||
COVERAGE_LINK="* [Coverage #${GITHUB_RUN_NUMBER}](run-${GITHUB_RUN_NUMBER}-COVERAGE-FILE-commit:-${SHORT_SHA}.md)"
|
||||
|
||||
TMP_FILE=".Home.tmp"
|
||||
|
||||
# Create Home.md if it doesn't exist
|
||||
if [ ! -f "$HOME_FILE" ]; then
|
||||
echo "# 📘 Summary of Test Runs" > "$HOME_FILE"
|
||||
echo "" >> "$HOME_FILE"
|
||||
fi
|
||||
|
||||
# Prepend links to top of Home.md
|
||||
{
|
||||
echo "$TEST_LINK"
|
||||
echo "$COVERAGE_LINK"
|
||||
echo ""
|
||||
cat "$HOME_FILE"
|
||||
} > "$TMP_FILE"
|
||||
|
||||
mv "$TMP_FILE" "$HOME_FILE"
|
||||
|
||||
echo "✅ Home.md updated"
|
||||
|
||||
env:
|
||||
CI_TOKEN: ${{ secrets.CI_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user