Update .gitea/workflows/test.yml
This commit is contained in:
@@ -122,4 +122,36 @@ jobs:
|
||||
echo "==============================="
|
||||
echo "🔗 Allure Report:"
|
||||
echo "https://pytest-report-render.pages.dev/"
|
||||
echo "==============================="
|
||||
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
|
||||
Reference in New Issue
Block a user