Skip to content

Commit

Permalink
Update NuGet packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Nov 21, 2023
1 parent 3cb5c9e commit f8a6355
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.25.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.26.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.25.0" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.26.2" PrivateAssets="all" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions GitHubActionsTestLogger/GitHubActionsTestLogger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.25.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.7.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="PolyShim" Version="1.7.0" PrivateAssets="all" />
<PackageReference Include="RazorBlade" Version="0.4.3" ExcludeAssets="compile;runtime" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.26.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.8.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="PolyShim" Version="1.8.0" PrivateAssets="all" />
<PackageReference Include="RazorBlade" Version="0.4.4" ExcludeAssets="compile;runtime" PrivateAssets="all" />
</ItemGroup>

</Project>
6 changes: 5 additions & 1 deletion GitHubActionsTestLogger/TestLoggerContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,13 @@ public void HandleTestRunComplete(TestRunCompleteEventArgs args)
{
TestSuite =
_testRunCriteria
?.Sources?.FirstOrDefault()
?.Sources
?.FirstOrDefault()
?.Pipe(Path.GetFileNameWithoutExtension) ?? "Unknown Test Suite",

TargetFramework =
_testRunCriteria?.TryGetTargetFramework() ?? "Unknown Target Framework",

TestRunStatistics = new TestRunStatistics(
(int?)args.TestRunStatistics?[TestOutcome.Passed]
?? _testResults.Count(r => r.Outcome == TestOutcome.Passed),
Expand All @@ -124,6 +127,7 @@ public void HandleTestRunComplete(TestRunCompleteEventArgs args)
(int?)args.TestRunStatistics?.ExecutedTests ?? _testResults.Count,
args.ElapsedTimeInRunningTests
),

TestResults = _testResults
.Where(
r =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace GitHubActionsTestLogger.Utils.Extensions;
internal static class TestCaseExtensions
{
public static string GetTypeFullyQualifiedName(this TestCase testCase) =>
testCase.FullyQualifiedName
testCase
.FullyQualifiedName
// Strip the test cases (if this is a parameterized test method)
.SubstringUntil("(", StringComparison.OrdinalIgnoreCase)
// Strip everything after the last dot, to leave the full type name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ internal static class TestResultExtensions
if (string.IsNullOrWhiteSpace(testResult.TestCase.FullyQualifiedName))
return null;

var testMethodFullyQualifiedName = testResult.TestCase.FullyQualifiedName.SubstringUntil(
"(",
StringComparison.OrdinalIgnoreCase
);
var testMethodFullyQualifiedName = testResult
.TestCase
.FullyQualifiedName
.SubstringUntil("(", StringComparison.OrdinalIgnoreCase);

var testMethodName = testMethodFullyQualifiedName.SubstringAfterLast(
".",
Expand Down

0 comments on commit f8a6355

Please sign in to comment.