• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Aldaviva / SunsUpStreamsUp / 19255659206

11 Nov 2025 05:09AM UTC coverage: 80.105% (+0.5%) from 79.581%
19255659206

push

github

Aldaviva
Updated dependencies, fixed tests taking a long time

63 of 85 branches covered (74.12%)

24 of 27 new or added lines in 3 files covered. (88.89%)

153 of 191 relevant lines covered (80.1%)

23.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/SunsUpStreamsUp/Program.cs
1
using Microsoft.Extensions.Options;
2
using NodaTime;
3
using RuntimeUpgrade.Notifier;
4
using RuntimeUpgrade.Notifier.Data;
5
using SunsUpStreamsUp;
6
using SunsUpStreamsUp.Logic;
7
using SunsUpStreamsUp.Options;
8
using Twitch.Net;
9
using Unfucked.DI;
10
using Unfucked.OBS;
11
using Unfucked.Twitch;
12

13
HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
×
14

15
builder.Configuration.AlsoSearchForJsonFilesInExecutableDirectory();
×
16

17
builder.Logging.AddUnfuckedConsole(options => options.Color = true);
×
18

19
builder.Services
×
20
    .Configure<StreamOptions>(builder.Configuration.GetSection("stream"))
×
21
    .Configure<GeographicOptions>(builder.Configuration.GetSection("geography"))
×
22
    .AddHostedService<StreamManager>()
×
NEW
23
    .AddHostedService<SolarEventEmitterImpl>(SuperRegistration.INTERFACES)
×
24
    .AddSingleton<IClock>(SystemClock.Instance)
×
25
    .AddSingleton<IObsClientFactory, ObsClientFactory>()
×
26
    .AddSingleton(TimeProvider.System)
×
27
    .AddSingleton<ITwitchApi>(services => {
×
28
        StreamOptions options      = services.GetRequiredService<IOptions<StreamOptions>>().Value;
×
29
        string?       clientId     = options.twitchClientId;
×
30
        string?       clientSecret = options.twitchClientSecret;
×
31
        return clientId.HasText() && clientSecret.HasText() ? new TwitchApiClient(new TwitchApiBuilder(clientId).WithClientSecret(clientSecret).Build()) : null!;
×
32
    });
×
33

34
using IHost host = builder.Build();
×
35

36
using RuntimeUpgradeNotifier upgradeNotifier = new() {
×
37
    LoggerFactory   = host.Services.GetRequiredService<ILoggerFactory>(),
×
38
    RestartStrategy = RestartStrategy.AutoRestartProcess,
×
39
    ExitStrategy    = new HostedLifetimeExit(host)
×
40
};
×
41

42
try {
43
    await host.RunAsync();
×
44
    return 0;
×
45
} catch (ObsFailedToConnect) {
×
46
    return 1;
×
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc