Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion TUnit.Engine/Reporters/GitHubReporter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.Concurrent;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Testing.Platform.Extensions;
using Microsoft.Testing.Platform.Extensions.Messages;
Expand Down Expand Up @@ -69,6 +70,12 @@ public Task AfterRunAsync(int exitCode, CancellationToken cancellation)
return Task.CompletedTask;
}

var targetFramework = Assembly.GetExecutingAssembly()
.GetCustomAttributes<System.Runtime.Versioning.TargetFrameworkAttribute>()
.SingleOrDefault()
?.FrameworkDisplayName
?? RuntimeInformation.FrameworkDescription;

var last = _updates.ToDictionary(x => x.Key, x => x.Value.Last());

var passedCount = last.Count(x =>
Expand All @@ -88,7 +95,7 @@ public Task AfterRunAsync(int exitCode, CancellationToken cancellation)
x.Value.TestNode.Properties.AsEnumerable().Any(p => p is InProgressTestNodeStateProperty)).ToArray();

var stringBuilder = new StringBuilder();
stringBuilder.AppendLine($"### {Assembly.GetEntryAssembly()?.GetName().Name}");
stringBuilder.AppendLine($"### {Assembly.GetEntryAssembly()?.GetName().Name} ({targetFramework})");

if (!string.IsNullOrEmpty(Filter))
{
Expand Down
Loading