From c01ab0429277da8c72a3baa3028f74fce8d40f8a Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:54:47 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ci):=20=E5=88=86=E7=A6=BB=E6=A0=B8?= =?UTF-8?q?=E5=BF=83=E5=92=8C=E6=BA=90=E7=94=9F=E6=88=90=E5=99=A8=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将单一测试步骤拆分为核心测试和源生成器测试两个独立步骤 - 为核心测试指定特定的程序集GFramework.Core.Tests - 为源生成器测试指定特定的程序集GFramework.SourceGenerators.Tests - 更新测试报告文件命名规则以区分不同测试类型 - 移除合并后的CTRF报告生成步骤 --- .github/workflows/ci.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 486a86f..6385e8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,16 +69,21 @@ jobs: run: dotnet build -c Release --no-restore # 运行单元测试,输出TRX格式结果到TestResults目录 - - name: Test + - name: Test - Core run: | - REPORT_FILE="testResults-$(date +%s).trx" - - dotnet test \ - -c Release \ - --no-build \ - --logger "trx;LogFileName=testResults-$(date +%s)-$RANDOM.trx" \ - --results-directory TestResults - + dotnet test GFramework.Core.Tests \ + -c Release \ + --no-build \ + --logger "trx;LogFileName=core-$RANDOM.trx" \ + --results-directory TestResults + + - name: Test - SourceGenerators + run: | + dotnet test GFramework.SourceGenerators.Tests \ + -c Release \ + --no-build \ + --logger "trx;LogFileName=sg-$RANDOM.trx" \ + --results-directory TestResults - name: Generate CTRF report run: | mkdir -p ctrf