Skip to content

Commit 0876105

Browse files
committed
Use .NET 9
1 parent 1df1046 commit 0876105

File tree

11 files changed

+18
-18
lines changed

11 files changed

+18
-18
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
deploy: ${{ inputs.deploy || github.ref_type == 'tag' }}
2929
package-version: ${{ inputs.package-version || (github.ref_type == 'tag' && github.ref_name) || format('0.0.0-ci-{0}', github.sha) }}
30-
dotnet-version: 8.0.x
30+
dotnet-version: 9.0.x
3131
# Don't use the default logger (which is GitHubActionsTestLogger) because that
3232
# causes contention issues since we're literally building and testing that logger.
3333
dotnet-test-logger: console

GitHubActionsTestLogger.Tests/AnnotationSpecs.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public void I_can_use_the_logger_to_produce_annotations_that_include_the_test_na
160160
new TestLoggerOptions
161161
{
162162
AnnotationTitleFormat = "<@test>",
163-
AnnotationMessageFormat = "[@test]"
163+
AnnotationMessageFormat = "[@test]",
164164
}
165165
);
166166

@@ -189,7 +189,7 @@ public void I_can_use_the_logger_to_produce_annotations_that_include_test_traits
189189
new TestLoggerOptions
190190
{
191191
AnnotationTitleFormat = "<@traits.Category -> @test>",
192-
AnnotationMessageFormat = "[@traits.Category -> @test]"
192+
AnnotationMessageFormat = "[@traits.Category -> @test]",
193193
}
194194
);
195195

@@ -223,7 +223,7 @@ public void I_can_use_the_logger_to_produce_annotations_that_include_the_error_m
223223
new TestLoggerOptions
224224
{
225225
AnnotationTitleFormat = "<@test: @error>",
226-
AnnotationMessageFormat = "[@test: @error]"
226+
AnnotationMessageFormat = "[@test: @error]",
227227
}
228228
);
229229

@@ -256,7 +256,7 @@ public void I_can_use_the_logger_to_produce_annotations_that_include_the_error_s
256256
new TestLoggerOptions
257257
{
258258
AnnotationTitleFormat = "<@test: @trace>",
259-
AnnotationMessageFormat = "[@test: @trace]"
259+
AnnotationMessageFormat = "[@test: @trace]",
260260
}
261261
);
262262

@@ -289,7 +289,7 @@ public void I_can_use_the_logger_to_produce_annotations_that_include_the_target_
289289
new TestLoggerOptions
290290
{
291291
AnnotationTitleFormat = "<@test (@framework)>",
292-
AnnotationMessageFormat = "[@test (@framework)]"
292+
AnnotationMessageFormat = "[@test (@framework)]",
293293
}
294294
);
295295

GitHubActionsTestLogger.Tests/GitHubActionsTestLogger.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

GitHubActionsTestLogger.Tests/InitializationSpecs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void I_can_use_the_logger_with_a_custom_configuration()
5151
["annotations.messageFormat"] = "MessageFormat",
5252
["summary.includePassedTests"] = "true",
5353
["summary.includeSkippedTests"] = "true",
54-
["summary.includeNotFoundTests"] = "true"
54+
["summary.includeNotFoundTests"] = "true",
5555
};
5656

5757
// Act

GitHubActionsTestLogger.Tests/Utils/Extensions/TestLoggerContextExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static void SimulateTestRun(
1414
this TestLoggerContext context,
1515
string testSuiteFilePath,
1616
string targetFrameworkName,
17-
params TestResult[] testResults
17+
params IReadOnlyList<TestResult> testResults
1818
)
1919
{
2020
context.HandleTestRunStart(
@@ -52,7 +52,7 @@ params TestResult[] testResults
5252
[TestOutcome.Skipped] = testResults.Count(r =>
5353
r.Outcome == TestOutcome.Skipped
5454
),
55-
[TestOutcome.None] = testResults.Count(r => r.Outcome == TestOutcome.None)
55+
[TestOutcome.None] = testResults.Count(r => r.Outcome == TestOutcome.None),
5656
}
5757
),
5858
false,
@@ -67,11 +67,11 @@ params TestResult[] testResults
6767
public static void SimulateTestRun(
6868
this TestLoggerContext context,
6969
string testSuiteName,
70-
params TestResult[] testResults
70+
params IReadOnlyList<TestResult> testResults
7171
) => context.SimulateTestRun(testSuiteName, "FakeTargetFramework", testResults);
7272

7373
public static void SimulateTestRun(
7474
this TestLoggerContext context,
75-
params TestResult[] testResults
75+
params IReadOnlyList<TestResult> testResults
7676
) => context.SimulateTestRun("FakeTests.dll", testResults);
7777
}

GitHubActionsTestLogger.Tests/Utils/TestResultBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal class TestResultBuilder
1212
Id = Guid.NewGuid(),
1313
Source = "FakeTests.dll",
1414
FullyQualifiedName = "FakeTests.FakeTest",
15-
DisplayName = "FakeTest"
15+
DisplayName = "FakeTest",
1616
}
1717
);
1818

GitHubActionsTestLogger/TestLoggerContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public void HandleTestRunComplete(TestRunCompleteEventArgs args)
130130
TestSuite = testSuite,
131131
TargetFramework = targetFramework,
132132
TestRunStatistics = testRunStatistics,
133-
TestResults = testResults
133+
TestResults = testResults,
134134
};
135135

136136
if (

GitHubActionsTestLogger/TestLoggerOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public static TestLoggerOptions Resolve(IReadOnlyDictionary<string, string?> par
3737
?? Default.SummaryIncludeSkippedTests,
3838
SummaryIncludeNotFoundTests =
3939
parameters.GetValueOrDefault("summary.includeNotFoundTests")?.Pipe(bool.Parse)
40-
?? Default.SummaryIncludeNotFoundTests
40+
?? Default.SummaryIncludeNotFoundTests,
4141
};
4242
}

GitHubActionsTestLogger/TestRunStatistics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ TimeSpan OverallDuration
1818
_ when PassedTestCount > 0 => TestOutcome.Passed,
1919
_ when SkippedTestCount > 0 => TestOutcome.Skipped,
2020
_ when TotalTestCount == 0 => TestOutcome.NotFound,
21-
_ => TestOutcome.None
21+
_ => TestOutcome.None,
2222
};
2323
}

GitHubActionsTestLogger/TestSummaryTemplate.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184

185185
// Using params here to write multiple lines as a workaround for the
186186
// fact that Razor does not support multiline raw string literals.
187-
private void WriteMarkdown(params string?[] lines)
187+
private void WriteMarkdown(params IEnumerable<string?> lines)
188188
{
189189
// Two line breaks are required to separate markdown from HTML
190190
base.WriteLiteral("\n\n");

0 commit comments

Comments
 (0)