Skip to content

Commit

Permalink
Merge pull request #2 from fiakkasa/Add-Net-9-Support
Browse files Browse the repository at this point in the history
Update to support .NET 9
  • Loading branch information
fiakkasa authored Nov 16, 2024
2 parents ac7e44d + 832df20 commit 86f2b74
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
"version": "5.3.9",
"version": "5.4.1",
"commands": [
"reportgenerator"
],
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: |
8.0.x
9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
9 changes: 5 additions & 4 deletions GraphHealthChecks.Tests/GraphHealthChecks.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HotChocolate.AspNetCore" Version="14.0.0"/>
<PackageReference Include="HotChocolate.AspNetCore.Authorization" Version="14.0.0"/>
<PackageReference Include="HotChocolate.AspNetCore" Version="14.1.0"/>
<PackageReference Include="HotChocolate.AspNetCore.Authorization" Version="14.1.0"/>
<PackageReference Include="ILogger.Moq" Version="1.1.10"/>
<PackageReference Include="Moq" Version="4.18.4"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.10"/>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.0"/>
<PackageReference Include="Moq.Contrib.HttpClient" Version="1.4.0"/>
<PackageReference Include="System.Text.Json" Version="9.0.0"/>
<PackageReference Include="xunit" Version="2.9.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
Expand Down
8 changes: 4 additions & 4 deletions GraphHealthChecks/GraphHealthChecks.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageId>$(MSBuildProjectName)</PackageId>
<Version>3.0.0</Version>
<Version>3.1.0</Version>
<Authors>Adamos Fiakkas</Authors>
<Description>Graph Health Checks for HotChocolate</Description>
<Copyright>Adamos Fiakkas</Copyright>
Expand All @@ -21,8 +21,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.10"/>
<PackageReference Include="HotChocolate.Execution" Version="14.0.0"/>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.0"/>
<PackageReference Include="HotChocolate.Execution" Version="14.1.0"/>
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions GraphHealthChecks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The purpose of this middleware is to provide feedback regarding the health of th

| HotChocolate Version | DataAnnotatedModelValidations Version | .NET Version |
|----------------------|---------------------------------------|--------------|
| 14.1.0 or higher | 3.1.0 | .NET 8, 9 |
| 14.0.0 or higher | 3.0.0 | .NET 8 |

### Past Releases
Expand Down
10 changes: 8 additions & 2 deletions NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@
- `dotnet new tool-manifest`
- `dotnet tool install dotnet-reportgenerator-globaltool`

## Update

- `dotnet tool update dotnet-reportgenerator-globaltool`

## Tests

📝 _The produced coverage.cobertura file is per .NET version ex. `coverage.cobertura.net9.0.xml`_

- Run:
`dotnet test /p:CollectCoverage=true /p:Threshold=80 /p:CoverletOutputFormat=cobertura /p:CoverletOutput='../coverage.cobertura.xml'`
- Report: `dotnet reportgenerator -reports:./coverage.cobertura.xml -targetdir:./TestResults -reporttypes:Html`
- Report: `dotnet reportgenerator -reports:./coverage.cobertura.net9.0.xml -targetdir:./TestResults -reporttypes:Html`

In one Go!

```powershell
dotnet test /p:CollectCoverage=true /p:Threshold=80 /p:CoverletOutputFormat=cobertura /p:CoverletOutput='../coverage.cobertura.xml'
dotnet reportgenerator -reports:./coverage.cobertura.xml -targetdir:./TestResults -reporttypes:Html
dotnet reportgenerator -reports:./coverage.cobertura.net9.0.xml -targetdir:./TestResults -reporttypes:Html
```

## Info
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The purpose of this middleware is to provide feedback regarding the health of th

| HotChocolate Version | DataAnnotatedModelValidations Version | .NET Version |
|----------------------|---------------------------------------|--------------|
| 14.1.0 or higher | 3.1.0 | .NET 8, 9 |
| 14.0.0 or higher | 3.0.0 | .NET 8 |

### Past Releases
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.400",
"version": "9.0.100",
"rollForward": "latestFeature"
}
}

0 comments on commit 86f2b74

Please sign in to comment.