Skip to content

Commit

Permalink
ci: try better assert logging, updated game ci versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammin committed Oct 17, 2024
1 parent 633d54c commit f3fe4b1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unity-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
22 changes: 20 additions & 2 deletions Assets/Tests/EditMode/Tests/ComponentTilesetTilesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Check failure on line 14 in Assets/Tests/EditMode/Tests/ComponentTilesetTilesTest.cs

View workflow job for this annotation

GitHub Actions / Test results editmode-2023.2.18f1

LDtkUnity.Tests.ComponentTilesTest.EnsureComponentExistences

project component null Expected: not null But was: null
Raw output
at LDtkUnity.Tests.ComponentTilesTest.EnsureComponentExistences () [0x00007] in /github/workspace/Assets/Tests/EditMode/Tests/ComponentTilesetTilesTest.cs:14

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)
{
Expand Down Expand Up @@ -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");

Check failure on line 66 in Assets/Tests/EditMode/Tests/ComponentTilesetTilesTest.cs

View workflow job for this annotation

GitHub Actions / Test results editmode-2023.2.18f1

LDtkUnity.Tests.ComponentTilesTest.TestIntGridWithoutRules

project component null Expected: not null But was: null
Raw output
at LDtkUnity.Tests.ComponentTilesTest.TestIntGridWithoutRules () [0x00007] in /github/workspace/Assets/Tests/EditMode/Tests/ComponentTilesetTilesTest.cs:66

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"));

Expand Down

0 comments on commit f3fe4b1

Please sign in to comment.