From d21370787bee380f7874fdd1eb0c8758d9b72d2e Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Mon, 6 Apr 2026 00:37:32 +0800 Subject: [PATCH] =?UTF-8?q?test(godot):=20=E6=B7=BB=E5=8A=A0Godot=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E9=A1=B9=E7=9B=AE=E5=B9=B6=E9=85=8D=E7=BD=AECI?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在CI工作流中添加GFramework.Godot.Tests项目的测试执行 - 配置dotnet test命令运行Godot测试套件 - 添加TRX格式的日志输出和测试结果目录设置 - 更新Godot模块的全局引用配置 - 在Timing.cs中添加必要的命名空间引用 - 在GodotTimeSourceTests.cs中添加NUnit框架引用 --- .github/workflows/ci.yml | 5 +++++ GFramework.Godot.Tests/Coroutine/GodotTimeSourceTests.cs | 1 + GFramework.Godot/Coroutine/Timing.cs | 3 +++ GFramework.Godot/GlobalUsings.cs | 3 ++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac273db5..bb3fb6b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -156,6 +156,11 @@ jobs: --logger "trx;LogFileName=ecs-arch-$RANDOM.trx" \ --results-directory TestResults & + dotnet test GFramework.Godot.Tests \ + -c Release \ + --no-build \ + --logger "trx;LogFileName=godot-$RANDOM.trx" \ + --results-directory TestResults & # 等待所有后台测试完成 wait diff --git a/GFramework.Godot.Tests/Coroutine/GodotTimeSourceTests.cs b/GFramework.Godot.Tests/Coroutine/GodotTimeSourceTests.cs index 3f46fb1b..752310f8 100644 --- a/GFramework.Godot.Tests/Coroutine/GodotTimeSourceTests.cs +++ b/GFramework.Godot.Tests/Coroutine/GodotTimeSourceTests.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using GFramework.Godot.Coroutine; +using NUnit.Framework; namespace GFramework.Godot.Tests.Coroutine; diff --git a/GFramework.Godot/Coroutine/Timing.cs b/GFramework.Godot/Coroutine/Timing.cs index 774bfcc1..d8913a7e 100644 --- a/GFramework.Godot/Coroutine/Timing.cs +++ b/GFramework.Godot/Coroutine/Timing.cs @@ -1,5 +1,8 @@ using System.Reflection; using GFramework.Core.Abstractions.Coroutine; +using GFramework.Core.Coroutine; +using GFramework.Core.Coroutine.Instructions; +using GFramework.Godot.Extensions; namespace GFramework.Godot.Coroutine; diff --git a/GFramework.Godot/GlobalUsings.cs b/GFramework.Godot/GlobalUsings.cs index 4d271811..41d45db7 100644 --- a/GFramework.Godot/GlobalUsings.cs +++ b/GFramework.Godot/GlobalUsings.cs @@ -15,4 +15,5 @@ global using System; global using System.Collections.Generic; global using System.Linq; global using System.Threading; -global using System.Threading.Tasks; \ No newline at end of file +global using System.Threading.Tasks; +global using Godot; \ No newline at end of file