From 9c69c4ec00ede57b819a95d5e803fa493bd5f4fa Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Tue, 17 Mar 2026 16:20:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ci):=20=E4=BC=98=E5=8C=96CI=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E4=B8=AD=E7=9A=84=E6=B5=8B=E8=AF=95=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将多个独立的测试步骤合并为单个并发执行步骤 - 移除重复的测试配置以简化工作流定义 - 保留后台测试等待机制确保执行完整性 - 统一测试项目名称提高可读性 --- .github/workflows/ci.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffda3e0..0ec9bbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,8 +113,8 @@ jobs: run: dotnet build -c Release --no-restore # 运行单元测试,输出TRX格式结果到TestResults目录 - # 使用并发执行以加快测试速度 - - name: Test - Core + # 在同一个 step 中并发执行所有测试以加快速度 + - name: Test All Projects run: | dotnet test GFramework.Core.Tests \ -c Release \ @@ -122,33 +122,26 @@ jobs: --logger "trx;LogFileName=core-$RANDOM.trx" \ --results-directory TestResults & - - name: Test - Game - run: | dotnet test GFramework.Game.Tests \ -c Release \ --no-build \ --logger "trx;LogFileName=game-$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: Test - ECS Arch - run: | dotnet test GFramework.Ecs.Arch.Tests \ -c Release \ --no-build \ --logger "trx;LogFileName=ecs-arch-$RANDOM.trx" \ --results-directory TestResults & - # 等待所有并发测试完成 - - name: Wait for tests - run: wait + # 等待所有后台测试完成 + wait - name: Generate CTRF report run: |