ci(TST-35): run gateway suite on windev nightly
ci / nightly-windev (push) Has been skipped
ci / java (push) Successful in 2m44s
ci / windows-x86 (push) Successful in 5m56s
ci / portable (push) Failing after 9m21s

This commit is contained in:
Joseph Doherty
2026-08-25 11:56:35 -04:00
parent ad79238c84
commit cc143b52cf
6 changed files with 80 additions and 16 deletions
@@ -0,0 +1,53 @@
namespace ZB.MOM.WW.MxGateway.Tests.ProjectStructure;
public sealed class WindevCiContractTests
{
[Fact]
public void LiveMode_RunsWindowsTiersInDocumentedOrder()
{
DirectoryInfo repositoryRoot = FindRepositoryRoot();
string script = File.ReadAllText(
Path.Combine(repositoryRoot.FullName, "scripts", "ci", "windev-worker-ci.ps1"));
string[] orderedSteps =
[
"Invoke-Native 'x86 Worker build'",
"Invoke-Native 'x86 Worker.Tests'",
"Invoke-Native 'full slnx build'",
"Invoke-Native 'gateway tests on Windows'",
"Invoke-Native 'live-MXAccess smoke'",
];
int previousIndex = -1;
foreach (string step in orderedSteps)
{
int currentIndex = script.IndexOf(step, StringComparison.Ordinal);
Assert.True(currentIndex >= 0, $"Missing windev live-mode step: {step}");
Assert.True(currentIndex > previousIndex, $"Windev live-mode step is out of order: {step}");
previousIndex = currentIndex;
}
Assert.Contains(
"dotnet test $gatewayTests -c Release --no-build",
script,
StringComparison.Ordinal);
}
private static DirectoryInfo FindRepositoryRoot()
{
DirectoryInfo? current = new(AppContext.BaseDirectory);
while (current is not null)
{
if (File.Exists(Path.Combine(current.FullName, "CLAUDE.md"))
&& Directory.Exists(Path.Combine(current.FullName, "src"))
&& Directory.Exists(Path.Combine(current.FullName, "scripts")))
{
return current;
}
current = current.Parent;
}
throw new InvalidOperationException("Could not locate the repository root from the test output directory.");
}
}