Add test result archiving to our test actions + Test fixes (#43175)

* Add test result archiving to our test actions.

* heck.

* Don't waste tremendous amounts of storage.

* Fix ReagentDataTest.

* Reduce retention and increase compression on integration output.

* Back to 7 days, depend on RT instead.

* Poke.

* Fix linter.

* til.

* Actually send YAMLLinter's pair messages into the void.
This commit is contained in:
Moony
2026-03-17 18:17:22 +01:00
committed by GitHub
parent 9b0067eff4
commit ec8f1d7ea4
3 changed files with 20 additions and 6 deletions
+12 -2
View File
@@ -45,13 +45,23 @@ jobs:
run: dotnet build --configuration DebugOpt --no-restore /m
- name: Run Content.Tests
run: dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0
shell: pwsh
run: dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 NUnit.TestOutputXml="logs" NUnit.WorkDirectory="$(pwd)/test_results"
- name: Run Content.IntegrationTests
shell: pwsh
run: |
$env:DOTNET_gcServer=1
dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed
dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed NUnit.TestOutputXml="logs" NUnit.WorkDirectory="$(pwd)/test_results"
- name: Archive NUnit3 test results.
if: always()
uses: actions/upload-artifact@v4
with:
name: nunit3-results-${{ matrix.os }}
path: test_results/*
retention-days: 7
compression-level: 9
ci-success:
name: Build & Test Debug
needs:
@@ -8,7 +8,7 @@ namespace Content.IntegrationTests.Tests.Chemistry;
[TestFixture]
[TestOf(typeof(ReagentData))]
public sealed class ReagentDataTest : InteractionTest
public sealed class ReagentDataTest
{
[Test]
public async Task ReagentDataIsSerializable()
+7 -3
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
@@ -11,11 +12,14 @@ using Robust.Shared.Serialization.Markdown.Validation;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Robust.UnitTesting;
using Robust.UnitTesting.Pool;
namespace Content.YAMLLinter
{
internal static class Program
{
private static readonly ExternalTestContext TestContext = new("YAML Linter", StreamWriter.Null);
private static async Task<int> Main(string[] _)
{
GameDataScrounger.NoScrounging = true; // Ugly hack for YAML Linter.
@@ -57,7 +61,7 @@ namespace Content.YAMLLinter
private static async Task<(Dictionary<string, HashSet<ErrorNode>> YamlErrors, List<string> FieldErrors)>
ValidateClient()
{
await using var pair = await PoolManager.GetServerClient();
await using var pair = await PoolManager.GetServerClient(testContext: TestContext);
var client = pair.Client;
var result = await ValidateInstance(client);
await pair.CleanReturnAsync();
@@ -67,7 +71,7 @@ namespace Content.YAMLLinter
private static async Task<(Dictionary<string, HashSet<ErrorNode>> YamlErrors, List<string> FieldErrors)>
ValidateServer()
{
await using var pair = await PoolManager.GetServerClient();
await using var pair = await PoolManager.GetServerClient(testContext: TestContext);
var server = pair.Server;
var result = await ValidateInstance(server);
await pair.CleanReturnAsync();
@@ -179,7 +183,7 @@ namespace Content.YAMLLinter
private static async Task<(Assembly[] clientAssemblies, Assembly[] serverAssemblies)>
GetClientServerAssemblies()
{
await using var pair = await PoolManager.GetServerClient();
await using var pair = await PoolManager.GetServerClient(testContext: TestContext);
var result = (GetAssemblies(pair.Client), GetAssemblies(pair.Server));