From 94e675009d5ce268afc57d40af60cf6a2e4e9148 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Thu, 10 Jul 2025 17:22:10 +0200 Subject: [PATCH] Update .gitea/workflows/test.yml --- .gitea/workflows/test.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index d5df2a812..882f15f6e 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -122,4 +122,36 @@ jobs: echo "===============================" echo "🔗 Allure Report:" echo "https://pytest-report-render.pages.dev/" - echo "===============================" \ No newline at end of file + echo "===============================" + + wiki: + needs: tests + runs-on: ubuntu-latest + + steps: + - name: Checkout repo and wiki + run: | + git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git wiki + + - name: Get commit info + id: info + run: | + echo "short_sha=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_OUTPUT + echo "commit_msg=${{ github.event.head_commit.message }}" >> $GITHUB_OUTPUT + echo "commit_num=$(echo '${{ github.event.head_commit.message }}' | grep -oE '#[0-9]+' | head -n1)" >> $GITHUB_OUTPUT + + - name: Copy test report and coverage summary to wiki + run: | + mkdir -p wiki/reports + + cp ci-reports/markdown/TEST-REPORT.md wiki/reports/test-report-${{ steps.info.outputs.short_sha }}-${{ steps.info.outputs.commit_num }}.md + cp ci-reports/markdown/coverage-summary.md wiki/reports/coverage-${{ steps.info.outputs.short_sha }}-${{ steps.info.outputs.commit_num }}.md + + - name: Commit and push to wiki + run: | + cd wiki + git config user.name "ci-bot" + git config user.email "ci-bot@example.com" + git add . + git commit -m "Add test report for ${{ steps.info.outputs.short_sha }} ${{ steps.info.outputs.commit_num }}" || echo "Nothing to commit" + git push \ No newline at end of file