From d25b8661aeaa213573acd93eea19fdaa0302afdb Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Sat, 17 Jan 2026 11:37:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(.github):=20=E6=B7=BB=E5=8A=A0.NET?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8A=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 配置dotnet test命令输出TRX格式的测试结果文件 - 集成dorny/test-reporter@v2来展示.NET测试报告 - 使用TestResults/*.trx路径匹配测试结果文件 - 采用dotnet-trx报告器格式化显示测试统计信息 --- .github/workflows/auto-tag.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index 019ba77..d1a63ae 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -60,9 +60,20 @@ jobs: run: dotnet restore - name: Build run: dotnet build -c Release --no-restore -p:DebugType=portable - - name: Test - # run: dotnet test --no-build -c Release --verbosity normal - run: dotnet test --no-build -c Release --verbosity normal 2>&1 | grep -E "测试总数|通过数|失败数" + - name: Run tests + run: | + dotnet test \ + --no-build \ + -c Release \ + --logger "trx;LogFileName=test-results.trx" + + - name: Test Report + uses: dorny/test-reporter@v2 + if: always() + with: + name: .NET Test Results + path: TestResults/*.trx + reporter: dotnet-trx # 步骤三:计算下一个版本号(若未被跳过) # 自动解析当前最新标签并递增修订号生成新的语义化版本号 - name: Get next version