Update .gitea/workflows/test.yml
This commit is contained in:
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user