From 04da7f4253ad0b0ff440a0214f177c2bfc2fa94d Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Sat, 6 Sep 2025 21:12:41 +0800 Subject: [PATCH 1/4] Support `net9.0` and remove `netcoreapp3.1` --- Directory.Build.props | 22 +++++++++---------- common.props | 4 ++-- common.testing.props | 6 ++--- .../Stepping.DbProviders.EfCore.csproj | 6 ++--- ...Stepping.TmProviders.LocalTm.EfCore.csproj | 6 ++--- ...ders.LocalTm.HostedServiceProcessor.csproj | 2 +- .../Stepping.TmProviders.LocalTm.csproj | 2 +- .../Stepping.DbProviders.EfCore.Tests.csproj | 4 ++-- .../Tests/EfCoreDbBarrierInserterTests.cs | 12 ---------- .../Tests/MongoDbBarrierInserterTests.cs | 12 ---------- .../Stepping.TestBase.csproj | 10 ++++----- ...epping.TmProviders.Dtm.Grpc.TestApp.csproj | 2 +- ...ng.TmProviders.LocalTm.EfCore.Tests.csproj | 4 ++-- ...tepping.TmProviders.LocalTm.TestApp.csproj | 6 ++--- 14 files changed, 37 insertions(+), 61 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 790aafd..301a8b4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,23 +1,23 @@ - 2.60.0 - 3.25.2 + 2.71.0 + 3.32.0 - 8.0.1 - 6.0.26 - 5.0.17 + 9.0.8 + 8.0.19 + 6.0.36 - 2.1.28 - 2.23.1 - 3.1.3 + 2.1.66 + 3.4.3 + 4.1.0 13.0.3 - 8.0.0 - 17.8.0 + 9.0.8 + 17.13.0 - 1.0.5 + 1.0.8 \ No newline at end of file diff --git a/common.props b/common.props index 5d6b255..c8d3627 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 1.3.0 + 1.4.0 $(NoWarn);CS1591 Stepping Stepping @@ -18,7 +18,7 @@ - + All runtime; build; native; contentfiles; analyzers diff --git a/common.testing.props b/common.testing.props index ca1f05b..6f5ee1e 100644 --- a/common.testing.props +++ b/common.testing.props @@ -1,15 +1,15 @@ - net8.0;net6.0;netcoreapp3.1 + net9.0;net8.0;net6.0 enable enable - 10.0 + latest false - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Stepping.DbProviders.EfCore/Stepping.DbProviders.EfCore.csproj b/src/Stepping.DbProviders.EfCore/Stepping.DbProviders.EfCore.csproj index b30ea87..4c6cf33 100644 --- a/src/Stepping.DbProviders.EfCore/Stepping.DbProviders.EfCore.csproj +++ b/src/Stepping.DbProviders.EfCore/Stepping.DbProviders.EfCore.csproj @@ -3,7 +3,7 @@ - net8.0;net6.0;netstandard2.1 + net9.0;net8.0;net6.0 enable enable @@ -15,9 +15,9 @@ - + + - diff --git a/src/Stepping.TmProviders.LocalTm.EfCore/Stepping.TmProviders.LocalTm.EfCore.csproj b/src/Stepping.TmProviders.LocalTm.EfCore/Stepping.TmProviders.LocalTm.EfCore.csproj index af274f6..0af1fd1 100644 --- a/src/Stepping.TmProviders.LocalTm.EfCore/Stepping.TmProviders.LocalTm.EfCore.csproj +++ b/src/Stepping.TmProviders.LocalTm.EfCore/Stepping.TmProviders.LocalTm.EfCore.csproj @@ -3,7 +3,7 @@ - net8.0;net6.0;netstandard2.1 + net9.0;net8.0;net6.0 enable enable @@ -14,9 +14,9 @@ - + + - diff --git a/src/Stepping.TmProviders.LocalTm.HostedServiceProcessor/Stepping.TmProviders.LocalTm.HostedServiceProcessor.csproj b/src/Stepping.TmProviders.LocalTm.HostedServiceProcessor/Stepping.TmProviders.LocalTm.HostedServiceProcessor.csproj index 11f14a0..4b5740b 100644 --- a/src/Stepping.TmProviders.LocalTm.HostedServiceProcessor/Stepping.TmProviders.LocalTm.HostedServiceProcessor.csproj +++ b/src/Stepping.TmProviders.LocalTm.HostedServiceProcessor/Stepping.TmProviders.LocalTm.HostedServiceProcessor.csproj @@ -3,7 +3,7 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 enable enable diff --git a/src/Stepping.TmProviders.LocalTm/Stepping.TmProviders.LocalTm.csproj b/src/Stepping.TmProviders.LocalTm/Stepping.TmProviders.LocalTm.csproj index 399dd87..d57e41a 100644 --- a/src/Stepping.TmProviders.LocalTm/Stepping.TmProviders.LocalTm.csproj +++ b/src/Stepping.TmProviders.LocalTm/Stepping.TmProviders.LocalTm.csproj @@ -3,7 +3,7 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 enable enable diff --git a/test/Stepping.DbProviders.EfCore.Tests/Stepping.DbProviders.EfCore.Tests.csproj b/test/Stepping.DbProviders.EfCore.Tests/Stepping.DbProviders.EfCore.Tests.csproj index 46cb995..abcb8d3 100644 --- a/test/Stepping.DbProviders.EfCore.Tests/Stepping.DbProviders.EfCore.Tests.csproj +++ b/test/Stepping.DbProviders.EfCore.Tests/Stepping.DbProviders.EfCore.Tests.csproj @@ -3,9 +3,9 @@ - + + - diff --git a/test/Stepping.DbProviders.EfCore.Tests/Tests/EfCoreDbBarrierInserterTests.cs b/test/Stepping.DbProviders.EfCore.Tests/Tests/EfCoreDbBarrierInserterTests.cs index dd0a4f0..d185da2 100644 --- a/test/Stepping.DbProviders.EfCore.Tests/Tests/EfCoreDbBarrierInserterTests.cs +++ b/test/Stepping.DbProviders.EfCore.Tests/Tests/EfCoreDbBarrierInserterTests.cs @@ -97,13 +97,7 @@ public async Task Should_Insert_Rollback_Success_If_Another_Transaction_Commit() await transaction1.DisposeAsync(); await dbContext1.DisposeAsync(); -#if NETCOREAPP3_1 -#pragma warning disable xUnit1031 - task.Wait(CancellationToken.None); -#pragma warning restore xUnit1031 -#else await task.WaitAsync(CancellationToken.None); -#endif result.ShouldBeFalse(); } @@ -143,13 +137,7 @@ public async Task Should_Insert_Rollback_Success_If_Another_Transaction_Rollback await transaction1.DisposeAsync(); await dbContext1.DisposeAsync(); -#if NETCOREAPP3_1 -#pragma warning disable xUnit1031 - task.Wait(CancellationToken.None); -#pragma warning restore xUnit1031 -#else await task.WaitAsync(CancellationToken.None); -#endif result.ShouldBeTrue(); } diff --git a/test/Stepping.DbProviders.MongoDb.Tests/Tests/MongoDbBarrierInserterTests.cs b/test/Stepping.DbProviders.MongoDb.Tests/Tests/MongoDbBarrierInserterTests.cs index 9ffec99..7f98a22 100644 --- a/test/Stepping.DbProviders.MongoDb.Tests/Tests/MongoDbBarrierInserterTests.cs +++ b/test/Stepping.DbProviders.MongoDb.Tests/Tests/MongoDbBarrierInserterTests.cs @@ -99,13 +99,7 @@ public async Task Should_Insert_Rollback_Success_If_Another_Transaction_Commit() sessionHandle1.Dispose(); -#if NETCOREAPP3_1 -#pragma warning disable xUnit1031 - task.Wait(CancellationToken.None); -#pragma warning restore xUnit1031 -#else await task.WaitAsync(CancellationToken.None); -#endif result.ShouldBeFalse(); } @@ -144,13 +138,7 @@ public async Task Should_Insert_Rollback_Success_If_Another_Transaction_Rollback sessionHandle1.Dispose(); -#if NETCOREAPP3_1 -#pragma warning disable xUnit1031 - task.Wait(CancellationToken.None); -#pragma warning restore xUnit1031 -#else await task.WaitAsync(CancellationToken.None); -#endif result.ShouldBeTrue(); } diff --git a/test/Stepping.TestBase/Stepping.TestBase.csproj b/test/Stepping.TestBase/Stepping.TestBase.csproj index eb4c469..69ee868 100644 --- a/test/Stepping.TestBase/Stepping.TestBase.csproj +++ b/test/Stepping.TestBase/Stepping.TestBase.csproj @@ -6,11 +6,11 @@ - - - - - + + + + + diff --git a/test/Stepping.TmProviders.Dtm.Grpc.TestApp/Stepping.TmProviders.Dtm.Grpc.TestApp.csproj b/test/Stepping.TmProviders.Dtm.Grpc.TestApp/Stepping.TmProviders.Dtm.Grpc.TestApp.csproj index 4c4fcde..f6a4e70 100644 --- a/test/Stepping.TmProviders.Dtm.Grpc.TestApp/Stepping.TmProviders.Dtm.Grpc.TestApp.csproj +++ b/test/Stepping.TmProviders.Dtm.Grpc.TestApp/Stepping.TmProviders.Dtm.Grpc.TestApp.csproj @@ -1,7 +1,7 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 enable enable diff --git a/test/Stepping.TmProviders.LocalTm.EfCore.Tests/Stepping.TmProviders.LocalTm.EfCore.Tests.csproj b/test/Stepping.TmProviders.LocalTm.EfCore.Tests/Stepping.TmProviders.LocalTm.EfCore.Tests.csproj index a7293c5..b6342d0 100644 --- a/test/Stepping.TmProviders.LocalTm.EfCore.Tests/Stepping.TmProviders.LocalTm.EfCore.Tests.csproj +++ b/test/Stepping.TmProviders.LocalTm.EfCore.Tests/Stepping.TmProviders.LocalTm.EfCore.Tests.csproj @@ -3,9 +3,9 @@ - + + - diff --git a/test/Stepping.TmProviders.LocalTm.TestApp/Stepping.TmProviders.LocalTm.TestApp.csproj b/test/Stepping.TmProviders.LocalTm.TestApp/Stepping.TmProviders.LocalTm.TestApp.csproj index 81974e6..6e24ff9 100644 --- a/test/Stepping.TmProviders.LocalTm.TestApp/Stepping.TmProviders.LocalTm.TestApp.csproj +++ b/test/Stepping.TmProviders.LocalTm.TestApp/Stepping.TmProviders.LocalTm.TestApp.csproj @@ -1,15 +1,15 @@ - net8.0;net6.0 + net9.0;net8.0;net6.0 enable enable - + + - From 9862e3206e520bb88831ab789aeffa22947015c0 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Sat, 6 Sep 2025 21:53:58 +0800 Subject: [PATCH 2/4] Update GitHub workflows --- .github/workflows/publish.yml | 10 +++++----- .github/workflows/test.yml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e60e99b..4ef0f5e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,13 +6,13 @@ on: jobs: publish: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 - - uses: NuGet/setup-nuget@v1.0.5 - - uses: actions/setup-dotnet@v3 + - uses: actions/checkout@v4 + - uses: NuGet/setup-nuget@v2 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: 7.0.x + dotnet-version: 9.0.x - name: Read common.props id: commonProps diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b672c36..52a835d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: test: strategy: matrix: - os: [ubuntu-20.04, windows-latest] + os: [ubuntu-22.04, windows-latest] name: ${{ matrix.os }} runs-on: ${{ matrix.os }} if: ${{ !github.event.pull_request.draft }} @@ -27,9 +27,9 @@ jobs: - uses: actions/setup-dotnet@v3 with: dotnet-version: | - 3.1.x 6.0.x 7.0.x + 9.0.x - name: Install dependencies run: dotnet restore From f3c31597c41d4278609ccfb3fca81f8d7ce089c1 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Sat, 6 Sep 2025 22:45:22 +0800 Subject: [PATCH 3/4] Update `test.yml` --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52a835d..4869507 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,8 +23,8 @@ jobs: runs-on: ${{ matrix.os }} if: ${{ !github.event.pull_request.draft }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-dotnet@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 with: dotnet-version: | 6.0.x @@ -59,4 +59,4 @@ jobs: - name: Codecov if: ${{ startsWith(matrix.os, 'ubuntu') }} - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 From 9169dfcddd1523fb7eed445ca3f410e0b10daa1c Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Sat, 6 Sep 2025 23:06:16 +0800 Subject: [PATCH 4/4] Update `test.yml` --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4869507..2cab3bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,3 +60,5 @@ jobs: - name: Codecov if: ${{ startsWith(matrix.os, 'ubuntu') }} uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }}