From ed72103c59968600417011389f7db6e65b15e246 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:34:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 TRX 日志文件名格式以包含程序集和框架信息 - 修改 CTRF 报告生成脚本以处理多个测试结果文件 - 添加循环遍历所有 TRX 文件并生成对应 CTRF 报告 - 移除只处理最新单个文件的限制 --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 305cf39..53be858 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,12 +74,15 @@ jobs: dotnet test \ -c Release \ --no-build \ - --logger "trx;LogFileName=testResults-$(date +%s).trx" \ + --logger "trx;LogFileName=testResults_{assembly}_{framework}-$(date +%s).trx" \ --results-directory TestResults - name: Generate CTRF report run: | - latest=$(ls -t TestResults/*.trx | head -n 1) - dotnet tool run DotnetCtrfJsonReporter -p "$latest" -t nunit + # 为每个 TRX 文件生成对应的 CTRF 报告 + for trx in TestResults/*.trx; do + echo "Processing $trx..." + dotnet tool run DotnetCtrfJsonReporter -p "$trx" -t nunit + done - name: Debug - Verify CTRF files if: always() run: |