From cfef1e1d03d19d40fa0aa21a647ea7d92c513494 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Thu, 29 Jan 2026 17:10:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(ci):=20=E9=9B=86=E6=88=90=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=8A=A5=E5=91=8A=E7=94=9F=E6=88=90=E5=92=8C=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增DotnetCtrfJsonReporter工具来生成JSON格式的测试报告, 并添加GitHub测试报告发布步骤,支持PR报告、摘要对比、 洞察分析、易失率、失败率和最慢测试等多维度报告展示。 --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7677a0..1b8ec46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,6 +64,7 @@ jobs: --no-build \ --logger trx \ --results-directory TestResults + dotnet tool run DotnetCtrfJsonReporter -t "TestResults/testResults.trx" # 生成并发布测试报告,无论测试成功或失败都会执行 - name: Test Report @@ -73,3 +74,17 @@ jobs: name: .NET Test Results path: TestResults/*.trx reporter: dotnet-trx + - name: Publish Test Report + uses: ctrf-io/github-test-reporter@v1 + with: + report-path: './ctrf/*.json' + github-report: true + pull-request-report: true + summary-delta-report: true + insights-report: true + flaky-rate-report: true + fail-rate-report: true + slowest-report: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: always() \ No newline at end of file