mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
fix(ci): 修复CI工作流中的.NET SDK版本配置和测试报告生成
- 修正了.NET SDK版本配置,支持多个版本并移除重复配置 - 更新了测试结果文件命名格式以避免冲突 - 修复了CTRF报告生成的路径和参数配置 - 移除了调试步骤中的条件检查逻辑
This commit is contained in:
parent
524ceff770
commit
c46cfa265e
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -35,12 +35,13 @@ jobs:
|
||||
# 当前提交哈希,作为扫描的目标版本
|
||||
head: ${{ github.sha }}
|
||||
|
||||
# 安装和配置.NET SDK版本9.0.x
|
||||
# 安装和配置.NET SDK版本
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
dotnet-version: 9.0.x
|
||||
|
||||
dotnet-version: 10.0.x
|
||||
# 配置NuGet包缓存以加速后续构建
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@v5
|
||||
@ -64,9 +65,12 @@ jobs:
|
||||
dotnet test \
|
||||
-c Release \
|
||||
--no-build \
|
||||
--logger trx \
|
||||
--logger "trx;LogFileName=testResults-$(date +%s).trx" \
|
||||
--results-directory TestResults
|
||||
dotnet tool run DotnetCtrfJsonReporter -t "TestResults/testResults.trx"
|
||||
- name: Generate CTRF report
|
||||
run: |
|
||||
latest=$(ls -t TestResults/*.trx | head -n 1)
|
||||
dotnet tool run DotnetCtrfJsonReporter -p "$latest" -t nunit
|
||||
- name: Debug - Verify CTRF files
|
||||
if: always()
|
||||
run: |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user