diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index d5a37854..393e1a08 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -2,6 +2,8 @@ name: GdUnit4 Tests on: push: &project_change_filter + branches: + - main paths: - 'Template/**/*.cs' - 'Template/**/*.gd' @@ -32,7 +34,7 @@ jobs: project_dir: './Template' paths: | res://Framework/Testing - res://Framework/Netcode/Testing + res://Framework/Netcode/Testing/Tests console-verbosity: 'normal' publish-report: false upload-report: true diff --git a/.gitignore b/.gitignore index 624ec72d..da6a7870 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ **/*.godot/* **/export.cfg **/export_presets.cfg -**/*.translation # Mono-specific **/.mono/ diff --git a/Template/.gitignore b/Template/.gitignore index 98a8c440..849524c0 100644 --- a/Template/.gitignore +++ b/Template/.gitignore @@ -2,7 +2,6 @@ .godot/* export.cfg export_presets.cfg -**/*.translation # Mono-specific .mono/ diff --git a/Template/Framework/Localisation/text.en.translation b/Template/Framework/Localisation/text.en.translation new file mode 100644 index 00000000..63f06245 Binary files /dev/null and b/Template/Framework/Localisation/text.en.translation differ diff --git a/Template/Framework/Localisation/text.fr.translation b/Template/Framework/Localisation/text.fr.translation new file mode 100644 index 00000000..8d51b034 Binary files /dev/null and b/Template/Framework/Localisation/text.fr.translation differ diff --git a/Template/Framework/Localisation/text.ja.translation b/Template/Framework/Localisation/text.ja.translation new file mode 100644 index 00000000..50800f85 Binary files /dev/null and b/Template/Framework/Localisation/text.ja.translation differ diff --git a/Template/Framework/Netcode/Testing/Net/ENetTestHarness.cs b/Template/Framework/Netcode/Testing/Net/ENetTestHarness.cs index 1d58d1f6..382ff377 100644 --- a/Template/Framework/Netcode/Testing/Net/ENetTestHarness.cs +++ b/Template/Framework/Netcode/Testing/Net/ENetTestHarness.cs @@ -1,3 +1,4 @@ +using __TEMPLATE__; using __TEMPLATE__.Netcode; using __TEMPLATE__.Netcode.Client; using System; @@ -18,6 +19,7 @@ public sealed class ENetTestHarness : IAsyncDisposable public TestServer Server { get; } public TestClient Client { get; } public Task ConnectTask { get; private set; } = null!; + private readonly Logger _loggerService; private static int _enetRefCount; @@ -26,6 +28,9 @@ public ENetTestHarness(Action onPacket) AddEnetRef(); Server = new TestServer(onPacket); Client = new TestClient(); + _loggerService = new Logger(); + Server.ConfigureLoggerService(_loggerService); + Client.ConfigureLoggerService(_loggerService); } public async Task ConnectAsync(TimeSpan timeout, ENetOptions? options = null) @@ -79,6 +84,7 @@ public async ValueTask DisposeAsync() await WaitForStoppedAsync("client", () => Client.IsRunning, _shutdownTimeout); await WaitForStoppedAsync("server", () => Server.IsRunning, _shutdownTimeout); + _loggerService.Dispose(); ReleaseEnetRef(); } diff --git a/Template/Template.csproj b/Template/Template.csproj index 5366bad2..b03de65f 100644 --- a/Template/Template.csproj +++ b/Template/Template.csproj @@ -17,6 +17,12 @@ NU1605;CS0108;IDE0290 + + + false + false + +