Update .gitignore to exclude TypeScript build info and add dist directory. Expand README with project overview, technology stack, prerequisites, and instructions for running and testing the application.
ci / server (push) Failing after 4m10s
ci / client (push) Successful in 17s

This commit is contained in:
Leonid Pershin
2026-08-18 11:11:48 +03:00
parent 84aafb0b69
commit e6739e7912
84 changed files with 5698 additions and 2 deletions
@@ -0,0 +1,51 @@
using Microsoft.Extensions.Logging;
namespace HSchool.AppHost.Tests;
/// <summary>
/// Boots the AppHost once for the whole suite — starting it per test costs about ten
/// seconds each. The client resource is skipped (<c>HSchool:Headless</c>), so the tests
/// need no Node install.
/// </summary>
public sealed class AppHostFixture : IAsyncLifetime
{
private static readonly TimeSpan StartupTimeout = TimeSpan.FromSeconds(120);
private DistributedApplication? _app;
public DistributedApplication App =>
_app ?? throw new InvalidOperationException("The AppHost has not been started.");
public async ValueTask InitializeAsync()
{
var appHost = await DistributedApplicationTestingBuilder
.CreateAsync<Projects.HSchool_AppHost>(["--HSchool:Headless=true"], CancellationToken.None);
appHost.Services.AddLogging(logging =>
{
logging.SetMinimumLevel(LogLevel.Warning);
logging.AddFilter("Aspire.", LogLevel.Warning);
});
_app = await appHost.BuildAsync().WaitAsync(StartupTimeout);
await _app.StartAsync().WaitAsync(StartupTimeout);
await _app.ResourceNotifications
.WaitForResourceHealthyAsync("server", CancellationToken.None)
.WaitAsync(StartupTimeout);
}
public async ValueTask DisposeAsync()
{
if (_app is not null)
{
await _app.DisposeAsync();
}
}
}
/// <summary>Groups every integration test around the single AppHost instance.</summary>
[CollectionDefinition(Name)]
public sealed class AppHostCollection : ICollectionFixture<AppHostFixture>
{
public const string Name = "apphost";
}