From f3fe4b10c97b58de26788ad150af8b75c0f0213e Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 17 Oct 2024 12:52:00 -0700 Subject: [PATCH] ci: try better assert logging, updated game ci versions --- .github/workflows/test-runner.yml | 2 +- .github/workflows/unity-builder.yml | 2 +- .../Tests/ComponentTilesetTilesTest.cs | 22 +++++++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index d3ad2401..989d3da9 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -40,7 +40,7 @@ jobs: Library-${{ matrix.unityVersion }} #Test Runner - - uses: game-ci/unity-test-runner@v4.1.1 + - uses: game-ci/unity-test-runner@v4.3.1 id: tests env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} diff --git a/.github/workflows/unity-builder.yml b/.github/workflows/unity-builder.yml index d690ae03..63753330 100644 --- a/.github/workflows/unity-builder.yml +++ b/.github/workflows/unity-builder.yml @@ -48,7 +48,7 @@ jobs: Library-${{ matrix.unityVersion }} #Build - - uses: game-ci/unity-builder@v4.2.3 + - uses: game-ci/unity-builder@v4.3.0 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} diff --git a/Assets/Tests/EditMode/Tests/ComponentTilesetTilesTest.cs b/Assets/Tests/EditMode/Tests/ComponentTilesetTilesTest.cs index 6a17808e..e5b412be 100644 --- a/Assets/Tests/EditMode/Tests/ComponentTilesetTilesTest.cs +++ b/Assets/Tests/EditMode/Tests/ComponentTilesetTilesTest.cs @@ -11,7 +11,16 @@ public class ComponentTilesTest public void EnsureComponentExistences() { LDtkComponentProject project = LoadProjectComponent(); - LDtkComponentLayer[] layers = project.Worlds[0].Levels[0].LayerInstances; + Assert.NotNull(project, "project component null"); + + LDtkComponentWorld world = project.Worlds[0]; + Assert.NotNull(world, "world component null"); + + LDtkComponentLevel level = world.Levels[0]; + Assert.NotNull(level, "level component null"); + + LDtkComponentLayer[] layers = level.LayerInstances; + Assert.NotNull(layers, "layers component null"); foreach (LDtkComponentLayer layer in layers) { @@ -54,7 +63,16 @@ public void EnsureComponentExistences() public void TestIntGridWithoutRules() { LDtkComponentProject project = LoadProjectComponent(); - LDtkComponentLayer[] layers = project.Worlds[0].Levels[0].LayerInstances; + Assert.NotNull(project, "project component null"); + + LDtkComponentWorld world = project.Worlds[0]; + Assert.NotNull(world, "world component null"); + + LDtkComponentLevel level = world.Levels[0]; + Assert.NotNull(level, "level component null"); + + LDtkComponentLayer[] layers = level.LayerInstances; + Assert.NotNull(layers, "layers component null"); Assert.True(layers.Any(p => p.Identifier == "IntGrid_without_rules"));