mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
fix(ci): 修复测试报告生成逻辑
- 更新 TRX 日志文件名格式以包含程序集和框架信息 - 修改 CTRF 报告生成脚本以处理多个测试结果文件 - 添加循环遍历所有 TRX 文件并生成对应 CTRF 报告 - 移除只处理最新单个文件的限制
This commit is contained in:
parent
dee89e1134
commit
ed72103c59
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -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: |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user