Skip to content

Commit

Permalink
Update NuGet packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Dec 31, 2023
1 parent 4277e34 commit eda84c5
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 21 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.26.5" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5" PrivateAssets="all" />
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6" 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.26.5" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5" PrivateAssets="all" />
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6" PrivateAssets="all" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.26.5" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" 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="PolyShim" Version="1.9.0" PrivateAssets="all" />
<PackageReference Include="RazorBlade" Version="0.5.0" ExcludeAssets="compile;runtime" PrivateAssets="all" />
</ItemGroup>

Expand Down
5 changes: 4 additions & 1 deletion GitHubActionsTestLogger/GitHubWorkflow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ private void InvokeCommand(
// URL-encode certain characters to ensure they don't get parsed as command tokens
// https://pakstech.com/blog/github-actions-workflow-commands
static string Escape(string value) =>
value.Replace("%", "%25").Replace("\n", "%0A").Replace("\r", "%0D");
value
.Replace("%", "%25", StringComparison.Ordinal)
.Replace("\n", "%0A", StringComparison.Ordinal)
.Replace("\r", "%0D", StringComparison.Ordinal);

var formattedOptions = options
?.Select(kvp => Escape(kvp.Key) + '=' + Escape(kvp.Value))
Expand Down
5 changes: 3 additions & 2 deletions GitHubActionsTestLogger/TestSummaryTemplate.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@
base.WriteLiteral(
literal
// Remove indentation
.Replace(" ", "")
.Replace(" ", "", StringComparison.Ordinal)
// Remove linebreaks
.Replace("\r", "").Replace("\n", "")
.Replace("\r", "", StringComparison.Ordinal)
.Replace("\n", "", StringComparison.Ordinal)
);
}
else
Expand Down
6 changes: 0 additions & 6 deletions GitHubActionsTestLogger/Utils/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ public static string SubstringAfterLast(
return index >= 0 ? str.Substring(index + sub.Length, str.Length - index - sub.Length) : "";
}

public static string Indent(this string str, int spaces)
{
var indentUnit = new string(' ', spaces);
return indentUnit + str.Replace("\n", "\n" + new string(' ', spaces));
}

public static int? TryParseInt(this string? str) =>
int.TryParse(str, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result)
? result
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 eda84c5

Please sign in to comment.