From 64070542c56514647d5cb1071c66dfaa0421ee91 Mon Sep 17 00:00:00 2001 From: Martijn Bodeman <11424653+skwasjer@users.noreply.github.com> Date: Sun, 15 Dec 2024 11:28:12 +0100 Subject: [PATCH] feat: add net9 (#114) * ci: add .NET 9 preview test pipeline * feat: add .NET 9 --- .github/workflows/codeql-analysis.yml | 1 + .github/workflows/main.yml | 1 + .github/workflows/net-preview.yml | 34 +++++++++++++++++++ .github/workflows/sonarcloud.yml | 1 + Directory.Build.props | 8 ++--- .../Correlate.Abstractions.csproj | 3 +- .../Correlate.AspNetCore.csproj | 3 +- src/Correlate.Core/Correlate.Core.csproj | 5 +-- .../Correlate.DependencyInjection.csproj | 3 +- .../Correlate.AspNetCore.Tests.csproj | 8 ++++- .../Correlate.Benchmarks.csproj | 3 +- .../Correlate.Core.Tests.csproj | 3 +- ...Correlate.DependencyInjection.Tests.csproj | 3 +- .../Correlate.Testing.csproj | 3 +- 14 files changed, 65 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/net-preview.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 47b16c3..0a4b484 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,6 +24,7 @@ env: DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_NOLOGO: true dotnet-version: | + 9.0.x 8.0.x 6.0.x 3.1.x diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11c2b3e..fd11351 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,7 @@ env: DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_NOLOGO: true dotnet-version: | + 9.0.x 8.0.x 6.0.x 3.1.x diff --git a/.github/workflows/net-preview.yml b/.github/workflows/net-preview.yml new file mode 100644 index 0000000..4689ef3 --- /dev/null +++ b/.github/workflows/net-preview.yml @@ -0,0 +1,34 @@ +on: + push: + branches: + - main + release: + types: + - published + pull_request: + +name: net-preview +env: + DOTNET_CLI_TELEMETRY_OPTOUT: true + DOTNET_NOLOGO: true + dotnet-version: 9.0.100-preview.7.24407.12 + dotnet-target: net9.0 + +jobs: + test: + runs-on: ubuntu-latest + steps: + # Setup + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.dotnet-version }} + + - run: dotnet --info + + # Checkout + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + # Run all tests + - run: dotnet test -c Release -f ${{ env.dotnet-target }} -p:NetPreview=true diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index ec84fdf..ebf63d0 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -13,6 +13,7 @@ env: DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_NOLOGO: true dotnet-version: | + 9.0.x 8.0.x 6.0.x 3.1.x diff --git a/Directory.Build.props b/Directory.Build.props index 8cc6495..2b6ce79 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,6 +18,10 @@ + 9.0.0 + + + 8.0.0 @@ -25,8 +29,4 @@ 6.0.0 - - 3.1.26 - - diff --git a/src/Correlate.Abstractions/Correlate.Abstractions.csproj b/src/Correlate.Abstractions/Correlate.Abstractions.csproj index dfaae7a..8edc4e4 100644 --- a/src/Correlate.Abstractions/Correlate.Abstractions.csproj +++ b/src/Correlate.Abstractions/Correlate.Abstractions.csproj @@ -1,7 +1,8 @@  - net8.0;net6.0;netstandard2.0 + net9.0;net8.0;net6.0;netstandard2.0 + $(TargetFrameworks);netx.0 Correlate diff --git a/src/Correlate.AspNetCore/Correlate.AspNetCore.csproj b/src/Correlate.AspNetCore/Correlate.AspNetCore.csproj index 2deeaad..c1bcf2e 100644 --- a/src/Correlate.AspNetCore/Correlate.AspNetCore.csproj +++ b/src/Correlate.AspNetCore/Correlate.AspNetCore.csproj @@ -1,7 +1,8 @@  - net8.0;net6.0 + net9.0;net8.0;net6.0 + $(TargetFrameworks);netx.0 Correlate diff --git a/src/Correlate.Core/Correlate.Core.csproj b/src/Correlate.Core/Correlate.Core.csproj index f657b01..e69a130 100644 --- a/src/Correlate.Core/Correlate.Core.csproj +++ b/src/Correlate.Core/Correlate.Core.csproj @@ -1,7 +1,8 @@  - net8.0;net6.0;netstandard2.0 + net9.0;net8.0;net6.0;netstandard2.0 + $(TargetFrameworks);netx.0 Correlate @@ -20,7 +21,7 @@ - + diff --git a/src/Correlate.DependencyInjection/Correlate.DependencyInjection.csproj b/src/Correlate.DependencyInjection/Correlate.DependencyInjection.csproj index 7619f22..7417c95 100644 --- a/src/Correlate.DependencyInjection/Correlate.DependencyInjection.csproj +++ b/src/Correlate.DependencyInjection/Correlate.DependencyInjection.csproj @@ -1,7 +1,8 @@  - net8.0;net6.0;netstandard2.0 + net9.0;net8.0;net6.0;netstandard2.0 + $(TargetFrameworks);netx.0 diff --git a/test/Correlate.AspNetCore.Tests/Correlate.AspNetCore.Tests.csproj b/test/Correlate.AspNetCore.Tests/Correlate.AspNetCore.Tests.csproj index 7c989c3..17c57d3 100644 --- a/test/Correlate.AspNetCore.Tests/Correlate.AspNetCore.Tests.csproj +++ b/test/Correlate.AspNetCore.Tests/Correlate.AspNetCore.Tests.csproj @@ -1,12 +1,18 @@  - net8.0;net6.0 + net9.0;net8.0;net6.0 + $(TargetFrameworks);netx.0 true Correlate + 9.0.0 + 9.0.0 + + + 8.0.8 8.0.0 diff --git a/test/Correlate.Benchmarks/Correlate.Benchmarks.csproj b/test/Correlate.Benchmarks/Correlate.Benchmarks.csproj index 2366d63..be2952a 100644 --- a/test/Correlate.Benchmarks/Correlate.Benchmarks.csproj +++ b/test/Correlate.Benchmarks/Correlate.Benchmarks.csproj @@ -2,7 +2,8 @@ Exe - net8.0;net6.0 + net9.0;net8.0;net6.0 + $(TargetFrameworks);netx.0 enable enable false diff --git a/test/Correlate.Core.Tests/Correlate.Core.Tests.csproj b/test/Correlate.Core.Tests/Correlate.Core.Tests.csproj index 4bfea15..5dd712c 100644 --- a/test/Correlate.Core.Tests/Correlate.Core.Tests.csproj +++ b/test/Correlate.Core.Tests/Correlate.Core.Tests.csproj @@ -1,7 +1,8 @@  - net8.0;net6.0;netcoreapp3.1 + net9.0;net8.0;net6.0;netcoreapp3.1 + $(TargetFrameworks);netx.0 true Correlate diff --git a/test/Correlate.DependencyInjection.Tests/Correlate.DependencyInjection.Tests.csproj b/test/Correlate.DependencyInjection.Tests/Correlate.DependencyInjection.Tests.csproj index c4c1e18..caa5b6f 100644 --- a/test/Correlate.DependencyInjection.Tests/Correlate.DependencyInjection.Tests.csproj +++ b/test/Correlate.DependencyInjection.Tests/Correlate.DependencyInjection.Tests.csproj @@ -1,7 +1,8 @@  - net8.0;net6.0;netcoreapp3.1 + net9.0;net8.0;net6.0;netcoreapp3.1 + $(TargetFrameworks);netx.0 true Correlate.DependencyInjection diff --git a/test/Correlate.Testing/Correlate.Testing.csproj b/test/Correlate.Testing/Correlate.Testing.csproj index 70575ca..7bc2e5d 100644 --- a/test/Correlate.Testing/Correlate.Testing.csproj +++ b/test/Correlate.Testing/Correlate.Testing.csproj @@ -1,7 +1,8 @@  - net8.0;net6.0;netstandard2.1 + net9.0;net8.0;net6.0;netstandard2.1 + $(TargetFrameworks);netx.0 false