From 7182dca5dcdf34b5550d629cec4e29d70f4f4a52 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Fri, 11 Jul 2025 14:31:01 +0200 Subject: [PATCH] Update .gitea/workflows/test.yml --- .gitea/workflows/test.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 0b1e7d9ce..dc265dab6 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -172,11 +172,9 @@ jobs: run: | short_sha=$(git rev-parse --short HEAD) commit_msg=$(git log -1 --pretty=%B) - commit_num=$(echo "$commit_msg" | grep -oE '#[0-9]+' | head -n1 || echo "no-PR") echo "🔍 Commit SHA: $short_sha" echo "🔍 Commit message: $commit_msg" - echo "🔍 Pull request number (if any): $commit_num" echo "short_sha=$short_sha" >> $GITHUB_OUTPUT echo "commit_num=$commit_num" >> $GITHUB_OUTPUT @@ -198,20 +196,22 @@ jobs: REPO_URL="https://gitea.psi.ch/tligui_y/slic" RUN_LINK="${REPO_URL}/actions/runs/${GITHUB_RUN_NUMBER}" SHORT_SHA=$(git rev-parse --short HEAD) + COMMIT_MSG=$(git log -1 --pretty=%s) + COMMIT_NUM=$(echo "$COMMIT_MSG" | grep -oE '#[0-9]+' | head -n1 || echo "") TEST_MD_PATH="wiki/run-${GITHUB_RUN_NUMBER}-test-report-commit-${SHORT_SHA}.md" COVERAGE_MD_PATH="wiki/run-${GITHUB_RUN_NUMBER}-coverage-commit-${SHORT_SHA}.md" echo "📄 Writing test report to $TEST_MD_PATH" { - echo "**🔗 View CI run logs for commit \`${SHORT_SHA}\` - run [#${GITHUB_RUN_NUMBER}](${RUN_LINK})**" + echo "**🔗 CI run [#${GITHUB_RUN_NUMBER}](${RUN_LINK}) for commit \`${SHORT_SHA}\`${COMMIT_NUM:+ $COMMIT_NUM} — _${COMMIT_MSG}_**" echo "" cat ci-reports/markdown/TEST-REPORT.md } > "$TEST_MD_PATH" echo "📄 Writing coverage report to $COVERAGE_MD_PATH" { - echo "**🔗 View CI run logs for commit \`${SHORT_SHA}\` - run [#${GITHUB_RUN_NUMBER}](${RUN_LINK})**" + echo "**🔗 CI run [#${GITHUB_RUN_NUMBER}](${RUN_LINK}) for commit \`${SHORT_SHA}\`${COMMIT_NUM:+ $COMMIT_NUM} — _${COMMIT_MSG}_**" echo "" cat ci-reports/markdown/coverage-summary.md } > "$COVERAGE_MD_PATH" @@ -220,6 +220,7 @@ jobs: echo " - $TEST_MD_PATH" echo " - $COVERAGE_MD_PATH" + - name: Commit and push to wiki run: | echo "📤 Committing and pushing wiki reports..."