Skip to content

Commit e6c5ceb

Browse files
committed
Expand tests to multiple platforms
1 parent 2233b93 commit e6c5ceb

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,28 @@ on:
1212
jobs:
1313
# This workflow contains a single job called "build"
1414
build:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [
19+
{
20+
name: Windows,
21+
runs-on: windows-latest,
22+
},
23+
{
24+
name: Ubuntu,
25+
runs-on: ubuntu-latest,
26+
},
27+
{
28+
name: MacOS,
29+
runs-on: macos-latest,
30+
}
31+
]
32+
1533
# The type of runner that the job will run on
16-
runs-on: windows-latest
34+
runs-on: ${{ matrix.os.runs-on }}
35+
36+
name: ${{ matrix.os.name }}
1737

1838
# Steps represent a sequence of tasks that will be executed as part of the job
1939
steps:
@@ -32,9 +52,3 @@ jobs:
3252

3353
- name: Run tests
3454
run: dotnet test --filter "FullyQualifiedName!~TerrariaServerAPI.Tests.Benchmarks"
35-
36-
# example task for the release CI
37-
# - name: "Releasing to NuGet: TSAPI"
38-
# env:
39-
# NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
40-
# run: dotnet nuget push ./TerrariaServerAPI/bin/Release/TerrariaServer.*.nupkg --source https://api.nuget.org/v3/index.json --api-key "$env:NUGET_API_KEY"

TerrariaServerAPI.Tests/BaseTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using NUnit.Framework;
22
using System;
3+
using System.Runtime.InteropServices;
34
using System.Threading;
45

56
namespace TerrariaServerAPI.Tests;
@@ -20,6 +21,7 @@ public void EnsureInitialised()
2021
instance.Initialize();
2122
are.Set();
2223
_initialized = true;
24+
Console.WriteLine($"Server init process successful for architecture {RuntimeInformation.ProcessArchitecture}");
2325
};
2426
HookEvents.Terraria.Main.DedServ += cb;
2527

0 commit comments

Comments
 (0)