Run native tests on Windows CI

This commit is contained in:
Wojciech Figat
2023-01-11 16:25:29 +01:00
parent 4a8f336118
commit 824ce1cacf
3 changed files with 2 additions and 51 deletions

View File

@@ -64,9 +64,10 @@ jobs:
- name: Build
run: |
.\GenerateProjectFiles.bat -vs2022
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget -BuildBindingsOnly
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget
dotnet msbuild Source\Tools\Flax.Build.Tests\Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo
- name: Test
run: |
.\Binaries\Editor\Win64\Development\FlaxTests.exe
.\Source\Platforms\DotNet\NUnit\nunit3-console.exe Binaries\Editor\Win64\Development\FlaxEngine.CSharp.dll --framework=netcore-7.0
.\Source\Platforms\DotNet\NUnit\nunit3-console.exe Binaries\Tests\Flax.Build.Tests.dll --framework=netcore-7.0

View File

@@ -1,48 +0,0 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.States;
using NUnit.Framework;
namespace FlaxEditor.Tests
{
[TestFixture]
public class TestEditorStates
{
/*[Test]
public void TestScriptsCompiledBeforeInit()
{
Editor editor = new Editor();
try
{
Scripting.ScriptsBuilder.CompilationsCount = 2;
editor.Init();
// Mock scripts compilation finish
}
finally
{
editor.Exit();
}
}*/
/*
[Test]
[Ignore("TODO: finish building api for unit tests")]
public void TestStatesChain()
{
Editor editor = new Editor();
editor.Init(true, true);
editor.EnsureState<LoadingState>();
// Mock scripts compilation finish
editor.Update();
ScriptsBuilder.Internal_OnEvent(ScriptsBuilder.EventType.CompileEndGood);
editor.Update();
editor.EnsureState<EditingSceneState>();
editor.Exit();
editor.EnsureState<ClosingState>();
}*/
}
}

View File

@@ -1,6 +1,5 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
#if FLAX_TESTS
namespace FlaxEngine
{
partial struct TestStruct : System.IEquatable<TestStruct>
@@ -128,4 +127,3 @@ namespace FlaxEngine
}
}
}
#endif