From 9a158d6c7e95f5b344f2faa523d8f39312738d01 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Thu, 29 Jan 2026 17:24:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(ci):=20=E6=B7=BB=E5=8A=A0CTRF=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E7=94=9F=E6=88=90=E5=92=8C=E8=B0=83=E8=AF=95=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建ctrf输出目录 - 使用DotnetCtrfJsonReporter工具生成CTRF格式测试报告 - 添加调试步骤验证CTRF文件生成 - 配置工具参数以正确处理TRX文件并输出JSON报告 --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4347971..7ca3c7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,8 +66,19 @@ jobs: --no-build \ --logger trx \ --results-directory TestResults - dotnet tool run DotnetCtrfJsonReporter -t "TestResults/testResults.trx" - + # 创建输出目录 + mkdir -p ctrf + + # 生成 CTRF 报告 (根据工具文档调整参数) + dotnet tool run DotnetCtrfJsonReporter \ + --trx-file-path "TestResults/*.trx" \ + --output-file "ctrf/report.json" + - name: Debug - Verify CTRF files + if: always() + run: | + echo "Checking for CTRF files..." + find . -name "*.json" -path "*/ctrf/*" -ls + ls -la ctrf/ 2>/dev/null || echo "No ctrf directory found" # 生成并发布测试报告,无论测试成功或失败都会执行 - name: Test Report uses: dorny/test-reporter@v2