Skip to content

Commit da6c60d

Browse files
save markdown unit test report
1 parent a058e36 commit da6c60d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/unit-tests.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,24 @@ jobs:
7878
[View Full Test Results](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
7979
"@
8080
81-
$report | Out-File -FilePath "test-report.md" -Encoding UTF8
81+
# Save to docs folder
82+
New-Item -ItemType Directory -Path "docs" -Force | Out-Null
83+
$report | Out-File -FilePath "docs/unit-test-report.md" -Encoding UTF8
8284
Write-Host $report
8385
8486
# Add to GitHub summary
8587
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "## 🧪 Unit Tests`n`n✅ **$passed** / $total tests passed"
8688
}
8789
90+
- name: Commit Test Report
91+
if: always()
92+
run: |
93+
git config user.name "github-actions[bot]"
94+
git config user.email "github-actions[bot]@users.noreply.github.com"
95+
git add docs/unit-test-report.md
96+
git commit -m "docs: update unit test report" || true
97+
git push || true
98+
8899
- name: Upload Test Results
89100
uses: actions/upload-artifact@v4
90101
if: always()
@@ -98,5 +109,5 @@ jobs:
98109
if: always()
99110
with:
100111
name: test-report
101-
path: test-report.md
112+
path: docs/unit-test-report.md
102113
retention-days: 30

0 commit comments

Comments
 (0)