Skip to content

Commit 56d0b53

Browse files
authored
.NET 10 support (#304)
* Add support for .NET 10 * remove sonarqube scanning * Fix warnings and upgrade dotnet-tools * Upgrade packages * Use new testing platform
1 parent 951eea1 commit 56d0b53

22 files changed

+56
-78
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,8 @@
22
"version": 1,
33
"isRoot": true,
44
"tools": {
5-
"dotnet-sonarscanner": {
6-
"version": "9.0.2",
7-
"commands": [
8-
"dotnet-sonarscanner"
9-
],
10-
"rollForward": false
11-
},
125
"nbgv": {
13-
"version": "3.7.115",
6+
"version": "3.9.50",
147
"commands": [
158
"nbgv"
169
],

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,6 @@ dotnet_style_namespace_match_folder = true
9494

9595
# CA1303: Do not pass literals as localized parameters
9696
dotnet_diagnostic.CA1303.severity = silent
97+
98+
# IDE0060: Remove unused parameter
99+
dotnet_diagnostic.IDE0060.severity = silent

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A clear and concise description of what you expected to happen.
2525

2626
**Background (please complete the following information):**
2727
- Version of library: [e.g. 0.10]
28-
- Version of .NET: [e.g. 8.0]
28+
- Version of .NET: [e.g. 10.0]
2929

3030
**Additional context**
3131
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/vulnerability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A clear and concise description of what you expected to happen.
2525

2626
**Background (please complete the following information):**
2727
- Version of library: [e.g. 0.10]
28-
- Version of .NET: [e.g. 7.0]
28+
- Version of .NET: [e.g. 10.0]
2929

3030
**Additional context**
3131
Add any other context about the vulnerability here.

.github/workflows/ci.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,23 @@ jobs:
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21-
- name: Update Java SDK for SonarQube
22-
uses: actions/setup-java@v4
23-
with:
24-
distribution: 'microsoft'
25-
java-version: '21'
2621
- name: Setup .NET versions
2722
uses: actions/setup-dotnet@v4
2823
with:
2924
dotnet-version: |
3025
8.0.x
3126
9.0.x
27+
10.0.x
3228
- name: Dump .NET info
3329
run: dotnet --info
3430
- name: Restore dotnet tools
3531
run: dotnet tool restore
36-
- name: Prepare sonarqube
37-
if: ${{ github.actor != 'dependabot[bot]' }}
38-
env:
39-
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
40-
run: dotnet sonarscanner begin -d:sonar.host.url=https://sonarcloud.io -organization:testablehttpclient -key:testablehttpclient_TestableHttpClient -version:`dotnet nbgv get-version --variable NuGetPackageVersion` -d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml -d:sonar.token=${{env.SONAR_TOKEN}}
4132
- name: Restore dependencies
4233
run: dotnet restore
4334
- name: Build source code
4435
run: dotnet build --configuration Release --no-restore
4536
- name: Test with dotnet
46-
run: dotnet test --configuration Release --no-build --collect="Code Coverage" --framework="net8.0"
47-
- name: Upload sonarqube results
48-
if: ${{ github.actor != 'dependabot[bot]' }}
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
52-
run: dotnet sonarscanner end -d:sonar.token=${{env.SONAR_TOKEN}}
37+
run: dotnet test --configuration Release --no-build --framework="net8.0"
5338
- name: Check source file format
5439
run: dotnet format --no-restore --verify-no-changes
5540
continue-on-error: true
@@ -59,10 +44,6 @@ jobs:
5944
with:
6045
name: artifacts
6146
path: ./artifacts
62-
- uses: actions/upload-artifact@v4
63-
with:
64-
name: coverage
65-
path: ./**/TestResults/**/coverage.opencover.xml
6647

6748
testOnSupportedDotnetVersions:
6849
strategy:
@@ -80,6 +61,7 @@ jobs:
8061
dotnet-version: |
8162
8.0.x
8263
9.0.x
64+
10.0.x
8365
- name: Dump .NET info
8466
run: dotnet --info
8567
- name: Restore dependencies
@@ -100,7 +82,7 @@ jobs:
10082
uses: actions/setup-dotnet@v4
10183
with:
10284
dotnet-version: |
103-
9.0.x
85+
10.0.x
10486
- uses: actions/download-artifact@v4
10587
with:
10688
name: artifacts

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
dotnet-version: |
2929
8.0.x
3030
9.0.x
31+
10.0.x
3132
- name: Initialize CodeQL
3233
uses: github/codeql-action/init@v3
3334
with:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1010
- .NET Framework 4.6.2, 4.7.0 and 4.7.2, since these can't be tested using xUnit v3
1111
### Added
1212
- Support for .NET 9.0
13+
- support for .NET 10.0
1314

1415
## [0.11] - 2024-06-15
1516
### Removed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ The following versions are being actively tested and thus supported:
8484
- .NET Framework 4.7.2 and 4.8
8585
- .NET 8.0
8686
- .NET 9.0
87+
- .NET 10.0
8788

8889
These versions are supported as long as Microsoft supports them, we do our best to test and support newer versions as soon as possible.
8990

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk": {
3-
"version": "9.0.100",
3+
"version": "10.0.100",
44
"allowPrerelease": false,
5-
"rollForward": "latestMajor"
5+
"rollForward": "latestMinor"
66
}
77
}

src/TestableHttpClient/IHttpRequestMessagesCheck.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ public interface IHttpRequestMessagesCheck
88
/// <summary>
99
/// Options that could be used by several asserters.
1010
/// </summary>
11-
TestableHttpMessageHandlerOptions Options { get; }
11+
public TestableHttpMessageHandlerOptions Options { get; }
1212

1313
/// <summary>
1414
/// Asserts whether requests comply with a specific filter.
1515
/// </summary>
1616
/// <param name="requestFilter">The filter to filter requests with before asserting.</param>
1717
/// <param name="condition">The name of the condition, used in the exception message.</param>
1818
/// <returns>The <seealso cref="IHttpRequestMessagesCheck"/> for further assertions.</returns>
19-
IHttpRequestMessagesCheck WithFilter(Func<HttpRequestMessage, bool> requestFilter, string condition);
19+
public IHttpRequestMessagesCheck WithFilter(Func<HttpRequestMessage, bool> requestFilter, string condition);
2020

2121
/// <summary>
2222
/// Asserts whether requests comply with a specific filter.
@@ -25,7 +25,7 @@ public interface IHttpRequestMessagesCheck
2525
/// <param name="expectedNumberOfRequests">The expected number of requests.</param>
2626
/// <param name="condition">The name of the condition, used in the exception message.</param>
2727
/// <returns>The <seealso cref="IHttpRequestMessagesCheck"/> for further assertions.</returns>
28-
IHttpRequestMessagesCheck WithFilter(Func<HttpRequestMessage, bool> requestFilter, int expectedNumberOfRequests, string condition);
28+
public IHttpRequestMessagesCheck WithFilter(Func<HttpRequestMessage, bool> requestFilter, int expectedNumberOfRequests, string condition);
2929

3030
/// <summary>
3131
/// Asserts whether requests comply with a specific filter.
@@ -34,5 +34,5 @@ public interface IHttpRequestMessagesCheck
3434
/// <param name="expectedNumberOfRequests">The expected number of requests, when null is passed "at least one" is presumed.</param>
3535
/// <param name="condition">The name of the condition, used in the exception message.</param>
3636
/// <returns>The <seealso cref="IHttpRequestMessagesCheck"/> for further assertions.</returns>
37-
IHttpRequestMessagesCheck WithFilter(Func<HttpRequestMessage, bool> requestFilter, int? expectedNumberOfRequests, string condition);
37+
public IHttpRequestMessagesCheck WithFilter(Func<HttpRequestMessage, bool> requestFilter, int? expectedNumberOfRequests, string condition);
3838
}

0 commit comments

Comments
 (0)