Skip to content

Commit eaded82

Browse files
authored
Drop net8.0 and net9.0, test against net11.0, switch from VSTest to MTPv2 with latest xUnit/Coverlet, refresh .gitignore (#224)
1 parent c0a4c13 commit eaded82

74 files changed

Lines changed: 372 additions & 389 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.config/dotnet-tools.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2026.2.4.1",
6+
"version": "2026.3.0",
77
"commands": [
88
"jb"
99
],
@@ -17,7 +17,7 @@
1717
"rollForward": false
1818
},
1919
"dotnet-reportgenerator-globaltool": {
20-
"version": "5.5.12",
20+
"version": "5.6.0",
2121
"commands": [
2222
"reportgenerator"
2323
],

‎.github/workflows/build.yml‎

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ jobs:
3838
steps:
3939
- name: Tune GitHub-hosted runner network
4040
uses: smorimoto/tune-github-hosted-runner-network@v1
41+
# Workaround for https://github.com/smorimoto/tune-github-hosted-runner-network/issues/5
42+
if: ${{ matrix.os != 'ubuntu-latest' }}
4143
- name: Setup .NET
4244
uses: actions/setup-dotnet@v6
4345
with:
4446
dotnet-version: |
45-
8.0.*
46-
9.0.*
4747
10.0.*
48+
11.0.*
4849
- name: Show installed versions
4950
shell: pwsh
5051
run: |
@@ -91,13 +92,19 @@ jobs:
9192
- name: Build
9293
run: dotnet build --no-restore --configuration Release /p:VersionSuffix=${{ env.PACKAGE_VERSION_SUFFIX }}
9394
- name: Test
94-
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;annotations-title=@test (@framework);annotations-message=@error\n@trace;summary-include-passed=false"
95+
run: >-
96+
dotnet test --no-build --configuration Release
97+
--coverlet
98+
--results-directory artifacts/test-results
99+
--report-github --report-github-annotations-title="@test (@framework)"
100+
--report-github-annotations-message="@error\n@trace" --report-github-summary-include-passed false
95101
- name: Upload coverage to codecov.io
96102
if: ${{ matrix.os == 'ubuntu-latest' }}
97103
env:
98104
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
99105
uses: codecov/codecov-action@v7
100106
with:
107+
directory: artifacts/test-results
101108
fail_ci_if_error: true
102109
verbose: true
103110
- name: Generate packages
@@ -121,13 +128,14 @@ jobs:
121128
steps:
122129
- name: Tune GitHub-hosted runner network
123130
uses: smorimoto/tune-github-hosted-runner-network@v1
131+
# Workaround for https://github.com/smorimoto/tune-github-hosted-runner-network/issues/5
132+
if: ${{ matrix.os != 'ubuntu-latest' }}
124133
- name: Setup .NET
125134
uses: actions/setup-dotnet@v6
126135
with:
127136
dotnet-version: |
128-
8.0.*
129-
9.0.*
130137
10.0.*
138+
11.0.*
131139
- name: Git checkout
132140
uses: actions/checkout@v7
133141
with:
@@ -179,13 +187,14 @@ jobs:
179187
steps:
180188
- name: Tune GitHub-hosted runner network
181189
uses: smorimoto/tune-github-hosted-runner-network@v1
190+
# Workaround for https://github.com/smorimoto/tune-github-hosted-runner-network/issues/5
191+
if: ${{ matrix.os != 'ubuntu-latest' }}
182192
- name: Setup .NET
183193
uses: actions/setup-dotnet@v6
184194
with:
185195
dotnet-version: |
186-
8.0.*
187-
9.0.*
188196
10.0.*
197+
11.0.*
189198
- name: Git checkout
190199
uses: actions/checkout@v7
191200
with:
@@ -227,8 +236,9 @@ jobs:
227236
contents: write
228237
id-token: write
229238
steps:
230-
- name: Tune GitHub-hosted runner network
231-
uses: smorimoto/tune-github-hosted-runner-network@v1
239+
# Workaround for https://github.com/smorimoto/tune-github-hosted-runner-network/issues/5
240+
#- name: Tune GitHub-hosted runner network
241+
#uses: smorimoto/tune-github-hosted-runner-network@v1
232242
- name: Download package artifacts
233243
uses: actions/download-artifact@v8
234244
with:

‎.github/workflows/codeql.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ jobs:
3030
uses: actions/setup-dotnet@v6
3131
with:
3232
dotnet-version: |
33-
8.0.*
34-
9.0.*
3533
10.0.*
34+
11.0.*
3635
- name: Git checkout
3736
uses: actions/checkout@v7
3837
with:

‎.gitignore‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bld/
5353
# (https://github.com/github/gitignore/pull/3736)
5454
#!**/[Bb]in/*.refresh
5555

56-
# Visual Studio 2015/2017 cache/options directory
56+
# Cache/options directory generated by Visual Studio since 2015
5757
.vs/
5858
# Uncomment if you have tasks that create the project's static files in wwwroot
5959
#wwwroot/
@@ -98,6 +98,7 @@ StyleCopReport.xml
9898
*_i.c
9999
*_p.c
100100
*_h.h
101+
*_i.h
101102
*.ilk
102103
*.meta
103104
*.obj
@@ -324,10 +325,6 @@ node_modules/
324325
*.dsw
325326
*.dsp
326327

327-
# Visual Studio 6 technical files
328-
*.ncb
329-
*.aps
330-
331328
# Visual Studio LightSwitch build output
332329
**/*.HTMLClient/GeneratedArtifacts
333330
**/*.DesktopClient/GeneratedArtifacts
@@ -452,4 +449,4 @@ FodyWeavers.xsd
452449
**/.idea/**/artifacts/
453450
**/.idea/**/httpRequests/
454451
**/.idea/**/dataSources/
455-
!**/.idea/**/codeStyles/*
452+
!**/.idea/**/codeStyles/*

‎Build.ps1‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ Write-Host "$(pwsh --version)"
66
Write-Host ".NET SDK $(dotnet --version)"
77

88
Remove-Item -Recurse -Force artifacts -ErrorAction SilentlyContinue
9-
Remove-Item -Recurse -Force * -Include coverage.cobertura.xml
109

1110
dotnet tool restore
1211
dotnet build --configuration Release
13-
dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage"
14-
dotnet reportgenerator -reports:**\coverage.cobertura.xml -targetdir:artifacts\coverage -filefilters:-*.g.cs
12+
dotnet test --no-build --configuration Release --coverlet --results-directory artifacts/test-results
13+
dotnet reportgenerator "-reports:artifacts/test-results/*cobertura*.xml" "-targetdir:artifacts/coverage"
1514
dotnet pack --no-build --configuration Release --output artifacts/packages

‎Directory.Build.props‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
99
<AnalysisMode>Recommended</AnalysisMode>
1010
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
11-
<RunSettingsFilePath>$(MSBuildThisFileDirectory)tests.runsettings</RunSettingsFilePath>
1211
<VersionPrefix>5.12.1</VersionPrefix>
1312
<VersionSuffix>pre</VersionSuffix>
1413
</PropertyGroup>
@@ -37,10 +36,18 @@
3736
</PropertyGroup>
3837

3938
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
39+
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
4040
<!-- CA1707: Identifiers should not contain underscores -->
4141
<NoWarn>$(NoWarn);CA1707</NoWarn>
4242
</PropertyGroup>
4343

44+
<ItemGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
45+
<None Include="$(MSBuildThisFileDirectory)testconfig.json" CopyToOutputDirectory="PreserveNewest" Visible="false" />
46+
47+
<Using Include="FluentAssertions" />
48+
<Using Include="Xunit" />
49+
</ItemGroup>
50+
4451
<PropertyGroup
4552
Condition="!$(MSBuildProjectName.StartsWith('JsonApiDotNetCore')) Or $(MSBuildProjectName.EndsWith('Tests')) Or $(MSBuildProjectName.EndsWith('Example'))">
4653
<!-- CA1062: Validate arguments of public methods -->
@@ -51,10 +58,4 @@
5158
<ItemGroup>
5259
<PackageReference Include="JetBrains.Annotations" Version="2026.2.*" PrivateAssets="All" />
5360
</ItemGroup>
54-
55-
<ItemGroup>
56-
<!-- MongoDB.Driver is unaffected, according to https://github.com/mongodb/mongo-csharp-driver/releases/tag/v3.8.1 -->
57-
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-6c8g-7p36-r338" />
58-
</ItemGroup>
59-
6061
</Project>

‎JsonApiDotNetCore.MongoDb.slnx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<File Path="package-versions.props" />
1515
<File Path="PackageReadme.md" />
1616
<File Path="README.md" />
17-
<File Path="tests.runsettings" />
17+
<File Path="testconfig.json" />
1818
</Folder>
1919
<Folder Name="/src/">
2020
<Project Path="src/JsonApiDotNetCore.MongoDb/JsonApiDotNetCore.MongoDb.csproj" />

‎JsonApiDotNetCore.MongoDb.slnx.DotSettings‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<s:Int64 x:Key="/Default/CodeEditing/NullCheckPatterns/PatternTypeNamesToPriority/=JetBrains_002EReSharper_002EFeature_002EServices_002ECSharp_002ENullChecking_002EIfThenThrowPattern/@EntryIndexedValue">2000</s:Int64>
44
<s:Int64 x:Key="/Default/CodeEditing/NullCheckPatterns/PatternTypeNamesToPriority/=JetBrains_002EReSharper_002EFeature_002EServices_002ECSharp_002ENullChecking_002EThrowExpressionNullCheckPattern/@EntryIndexedValue">3000</s:Int64>
55
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/PropagateAnnotations/@EntryValue">False</s:Boolean>
6-
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/GeneratedFilesAndFolders/=436CD921_002D3497_002DAD9F_002DF36B_002DBFDEA447A8E5_002Ff_003AReadOnlySet_002Ecs/@EntryIndexedValue">436CD921-3497-AD9F-F36B-BFDEA447A8E5/f:ReadOnlySet.cs</s:String>
76
<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
87
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/IdentifierHighlightingEnabled/@EntryValue">True</s:Boolean>
98
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArgumentsStyleAnonymousFunction/@EntryIndexedValue">SUGGESTION</s:String>

‎global.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"test": {
3+
"runner": "Microsoft.Testing.Platform"
4+
}
5+
}

‎package-versions.props‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,27 @@
22
<PropertyGroup>
33
<!-- Published dependencies (only update on major version change) -->
44
<JsonApiDotNetCoreFrozenVersion>5.12.0</JsonApiDotNetCoreFrozenVersion>
5-
<MongoDBDriverFrozenVersion>3.8.1</MongoDBDriverFrozenVersion>
5+
<MongoDBDriverFrozenVersion>3.14.0</MongoDBDriverFrozenVersion>
66

77
<!-- Non-published dependencies (these are safe to update, won't cause a breaking change) -->
88
<BogusVersion>35.6.*</BogusVersion>
9-
<CoverletVersion>8.0.*</CoverletVersion>
9+
<CoverletVersion>10.1.*</CoverletVersion>
1010
<EphemeralMongoVersion>3.3.*</EphemeralMongoVersion>
1111
<FluentAssertionsVersion>7.2.*</FluentAssertionsVersion>
1212
<GitHubActionsTestLoggerVersion>3.0.*</GitHubActionsTestLoggerVersion>
1313
<InheritDocVersion>2.0.*</InheritDocVersion>
14-
<MongoDBDriverVersion>3.12.*</MongoDBDriverVersion>
15-
<TestSdkVersion>18.11.*</TestSdkVersion>
16-
<XunitVersion>2.9.*</XunitVersion>
17-
<XunitVisualStudioVersion>4.0.*</XunitVisualStudioVersion>
14+
<MongoDBDriverVersion>3.14.*</MongoDBDriverVersion>
15+
<TestingPlatformVersion>2.5.*</TestingPlatformVersion>
16+
<XunitVersion>4.0.*</XunitVersion>
1817
</PropertyGroup>
1918

20-
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
19+
<PropertyGroup Condition="'$(TargetFramework)' == 'net11.0'">
2120
<!-- Non-published dependencies (these are safe to update, won't cause a breaking change) -->
22-
<AspNetCoreVersion>10.0.*</AspNetCoreVersion>
21+
<AspNetCoreVersion>11.0.*</AspNetCoreVersion>
2322
</PropertyGroup>
2423

25-
<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0'">
26-
<!-- Non-published dependencies (these are safe to update, won't cause a breaking change) -->
27-
<AspNetCoreVersion>9.0.*</AspNetCoreVersion>
28-
</PropertyGroup>
29-
30-
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
24+
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
3125
<!-- Non-published dependencies (these are safe to update, won't cause a breaking change) -->
32-
<AspNetCoreVersion>8.0.*</AspNetCoreVersion>
26+
<AspNetCoreVersion>10.0.*</AspNetCoreVersion>
3327
</PropertyGroup>
3428
</Project>

0 commit comments

Comments
 (0)