From fc1f5ca7d787ac94eabc0c89350f8a99b0e91e33 Mon Sep 17 00:00:00 2001 From: just Date: Tue, 11 Nov 2025 23:23:14 +0400 Subject: [PATCH] added net10 support --- .gitea/workflows/publish-nuget.yaml | 7 +++-- .gitea/workflows/test-dotnet.yaml | 44 +++++++++++++++++++---------- .vscode/settings.json | 3 +- src/Just.Cqrs/Just.Cqrs.csproj | 10 +++++-- tests/Cqrs.Tests/Cqrs.Tests.csproj | 21 +++++++++----- 5 files changed, 57 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/publish-nuget.yaml b/.gitea/workflows/publish-nuget.yaml index 2686fe9..e542848 100644 --- a/.gitea/workflows/publish-nuget.yaml +++ b/.gitea/workflows/publish-nuget.yaml @@ -10,13 +10,16 @@ jobs: publish: runs-on: ubuntu-latest + env: + DOTNET_CLI_TELEMETRY_OPTOUT: true + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup .NET uses: https://github.com/actions/setup-dotnet@v4 with: - dotnet-version: 9.x + dotnet-version: 10.x - name: Restore dependencies run: dotnet restore --nologo diff --git a/.gitea/workflows/test-dotnet.yaml b/.gitea/workflows/test-dotnet.yaml index 1ce7bee..3d69a86 100644 --- a/.gitea/workflows/test-dotnet.yaml +++ b/.gitea/workflows/test-dotnet.yaml @@ -21,34 +21,48 @@ on: jobs: test: runs-on: ubuntu-latest + name: .NET tests + + env: + DOTNET_CLI_TELEMETRY_OPTOUT: true + TEST_PROJECT: ./tests/Cqrs.Tests/Cqrs.Tests.csproj steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup .NET uses: https://github.com/actions/setup-dotnet@v4 with: - dotnet-version: '9.x' + dotnet-version: | + 8.0.x + 9.0.x + 10.0.x - name: Restore dependencies - run: dotnet restore --nologo + run: dotnet restore - - name: Build - run: dotnet build --nologo --configuration Release --no-restore + - name: Build .NET 10.0 + run: dotnet build --no-restore --framework net10.0 --configuration Release ${{ env.TEST_PROJECT }} - - name: Test - run: dotnet test --nologo --configuration Release --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage" + - name: Build .NET 9.0 + run: dotnet build --no-restore --framework net9.0 --configuration Release ${{ env.TEST_PROJECT }} - - name: Restore local tools - run: dotnet tool restore + - name: Build .NET 8.0 + run: dotnet build --no-restore --framework net8.0 --configuration Release ${{ env.TEST_PROJECT }} - - name: Generate coverage report - run: dotnet reportgenerator -reports:**/coverage.cobertura.xml -targetdir:./coverage -reporttypes:MarkdownSummary + - name: Test .NET 10.0 + run: dotnet run --no-build --framework net10.0 --configuration Release --project ${{ env.TEST_PROJECT }} -- -trx TestResults/results-net10.trx + + - name: Test .NET 9.0 + run: dotnet run --no-build --framework net9.0 --configuration Release --project ${{ env.TEST_PROJECT }} -- -trx TestResults/results-net9.trx + + - name: Test .NET 8.0 + run: dotnet run --no-build --framework net8.0 --configuration Release --project ${{ env.TEST_PROJECT }} -- -trx TestResults/results-net8.trx - name: Upload dotnet test results - #uses: actions/upload-artifact@v4 - uses: christopherhx/gitea-upload-artifact@v4 + uses: actions/upload-artifact@v3 with: - name: coverage-results - path: coverage + name: test-results + path: TestResults if: ${{ always() }} + retention-days: 30 diff --git a/.vscode/settings.json b/.vscode/settings.json index e2bb9bd..72c7ab7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "dotnet.defaultSolution": "Just.Cqrs.sln", - "dotnetAcquisitionExtension.enableTelemetry": false + "dotnetAcquisitionExtension.enableTelemetry": false, + "dotnet.testWindow.useTestingPlatformProtocol": true } diff --git a/src/Just.Cqrs/Just.Cqrs.csproj b/src/Just.Cqrs/Just.Cqrs.csproj index 872a7b3..e44ab43 100644 --- a/src/Just.Cqrs/Just.Cqrs.csproj +++ b/src/Just.Cqrs/Just.Cqrs.csproj @@ -1,7 +1,7 @@  - netstandard2.1;net8.0;net9.0 + netstandard2.1;net8.0;net9.0;net10.0 latest @@ -13,8 +13,12 @@ - - + + + + + + diff --git a/tests/Cqrs.Tests/Cqrs.Tests.csproj b/tests/Cqrs.Tests/Cqrs.Tests.csproj index 3fc76ee..13971c7 100644 --- a/tests/Cqrs.Tests/Cqrs.Tests.csproj +++ b/tests/Cqrs.Tests/Cqrs.Tests.csproj @@ -1,17 +1,20 @@  - net8.0;net9.0 + net8.0;net9.0;net10.0 latest + Exe false + true - - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + @@ -20,8 +23,12 @@ - - + + + + + +