diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 4ef0f5e..d06c625 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -12,7 +12,7 @@ jobs:
- uses: NuGet/setup-nuget@v2
- uses: actions/setup-dotnet@v4
with:
- dotnet-version: 9.0.x
+ dotnet-version: 10.0.x
- name: Read common.props
id: commonProps
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 2cab3bc..1f0c817 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -27,9 +27,9 @@ jobs:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
- 6.0.x
- 7.0.x
+ 8.0.x
9.0.x
+ 10.0.x
- name: Install dependencies
run: dotnet restore
diff --git a/Directory.Build.props b/Directory.Build.props
index 301a8b4..908d50b 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,23 +1,23 @@
- 2.71.0
- 3.32.0
+ 2.80.0
+ 3.35.1
- 9.0.8
- 8.0.19
- 6.0.36
+ 10.0.9
+ 9.0.17
+ 8.0.28
- 2.1.66
- 3.4.3
+ 2.1.79
+ 3.9.0
4.1.0
- 13.0.3
+ 13.0.4
- 9.0.8
- 17.13.0
+ 10.0.9
+ 18.6.0
- 1.0.8
+ 1.0.9
\ No newline at end of file
diff --git a/common.props b/common.props
index c8d3627..82d988f 100644
--- a/common.props
+++ b/common.props
@@ -1,7 +1,7 @@
latest
- 1.4.0
+ 1.5.0
$(NoWarn);CS1591
Stepping
Stepping
@@ -17,7 +17,7 @@
-
+
All
runtime; build; native; contentfiles; analyzers
diff --git a/common.testing.props b/common.testing.props
index 6f5ee1e..6d48fcb 100644
--- a/common.testing.props
+++ b/common.testing.props
@@ -1,6 +1,6 @@
- net9.0;net8.0;net6.0
+ net10.0;net9.0;net8.0
enable
enable
latest
@@ -9,7 +9,7 @@
-
+
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 4c6cf33..53812dd 100644
--- a/src/Stepping.DbProviders.EfCore/Stepping.DbProviders.EfCore.csproj
+++ b/src/Stepping.DbProviders.EfCore/Stepping.DbProviders.EfCore.csproj
@@ -3,7 +3,7 @@
- net9.0;net8.0;net6.0
+ net10.0;net9.0;net8.0
enable
enable
@@ -15,9 +15,9 @@
+
-
diff --git a/src/Stepping.TmProviders.Dtm.Grpc/Stepping/TmProviders/Dtm/Grpc/TransactionManagers/DtmGrpcTmClient.cs b/src/Stepping.TmProviders.Dtm.Grpc/Stepping/TmProviders/Dtm/Grpc/TransactionManagers/DtmGrpcTmClient.cs
index 462f4ce..8ae0b7d 100644
--- a/src/Stepping.TmProviders.Dtm.Grpc/Stepping/TmProviders/Dtm/Grpc/TransactionManagers/DtmGrpcTmClient.cs
+++ b/src/Stepping.TmProviders.Dtm.Grpc/Stepping/TmProviders/Dtm/Grpc/TransactionManagers/DtmGrpcTmClient.cs
@@ -95,7 +95,7 @@ protected virtual async Task BuildDtmRequestAsync(IAtomicJob job)
{
var configurations = job.GetDtmJobConfigurations();
- if (Options.ActionApiToken is not null or "")
+ if (Options.ActionApiToken is not (null or ""))
{
configurations.BranchHeaders.TryAdd(DtmRequestHeaderNames.ActionApiToken, Options.ActionApiToken);
}
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 0af1fd1..0c2ee4b 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 @@
- net9.0;net8.0;net6.0
+ net10.0;net9.0;net8.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 4b5740b..5f71d7e 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 @@
- net9.0;net8.0;net6.0
+ net10.0;net9.0;net8.0
enable
enable
diff --git a/src/Stepping.TmProviders.LocalTm/Stepping.TmProviders.LocalTm.csproj b/src/Stepping.TmProviders.LocalTm/Stepping.TmProviders.LocalTm.csproj
index d57e41a..c3316b6 100644
--- a/src/Stepping.TmProviders.LocalTm/Stepping.TmProviders.LocalTm.csproj
+++ b/src/Stepping.TmProviders.LocalTm/Stepping.TmProviders.LocalTm.csproj
@@ -3,7 +3,7 @@
- net9.0;net8.0;net6.0
+ net10.0;net9.0;net8.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 abcb8d3..548e4f0 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.TestBase/Stepping.TestBase.csproj b/test/Stepping.TestBase/Stepping.TestBase.csproj
index 69ee868..327d8a9 100644
--- a/test/Stepping.TestBase/Stepping.TestBase.csproj
+++ b/test/Stepping.TestBase/Stepping.TestBase.csproj
@@ -10,7 +10,7 @@
-
+
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 f6a4e70..6fae7d3 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 @@
- net9.0;net8.0;net6.0
+ net10.0;net9.0;net8.0
enable
enable
diff --git a/test/Stepping.TmProviders.Dtm.Grpc.Tests/Tests/DtmGrpcTmClientTests.cs b/test/Stepping.TmProviders.Dtm.Grpc.Tests/Tests/DtmGrpcTmClientTests.cs
index cffddf1..12196af 100644
--- a/test/Stepping.TmProviders.Dtm.Grpc.Tests/Tests/DtmGrpcTmClientTests.cs
+++ b/test/Stepping.TmProviders.Dtm.Grpc.Tests/Tests/DtmGrpcTmClientTests.cs
@@ -132,4 +132,37 @@ public async Task Should_Send_Submit()
dtmRequest.TransOptions.WaitResult.ShouldBeTrue();
dtmRequest.TransOptions.RequestTimeout.ShouldBe(Options.BranchRequestTimeout);
}
+
+ [Fact]
+ public async Task Should_Add_ActionApiToken_Header_When_Configured()
+ {
+ Options.ActionApiToken = "my-action-api-token";
+
+ var job = await AtomicJobFactory.CreateJobAsync(Guid.NewGuid().ToString(),
+ new FakeSteppingDbContext(true));
+ job.AddStep();
+
+ await FakeDtmGrpcTmClient.PrepareAsync(job);
+
+ var headers = FakeDtmGrpcTmClient.LastInvoking!.Value.Item2.TransOptions.BranchHeaders;
+ headers.ShouldContainKey(DtmRequestHeaderNames.ActionApiToken);
+ headers[DtmRequestHeaderNames.ActionApiToken].ShouldBe("my-action-api-token");
+ }
+
+ [Theory]
+ [InlineData(null)]
+ [InlineData("")]
+ public async Task Should_Not_Add_ActionApiToken_Header_When_Not_Configured(string? actionApiToken)
+ {
+ Options.ActionApiToken = actionApiToken;
+
+ var job = await AtomicJobFactory.CreateJobAsync(Guid.NewGuid().ToString(),
+ new FakeSteppingDbContext(true));
+ job.AddStep();
+
+ await FakeDtmGrpcTmClient.PrepareAsync(job);
+
+ var headers = FakeDtmGrpcTmClient.LastInvoking!.Value.Item2.TransOptions.BranchHeaders;
+ headers.ShouldNotContainKey(DtmRequestHeaderNames.ActionApiToken);
+ }
}
\ No newline at end of file
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 b6342d0..0def2d1 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 6e24ff9..2697108 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 @@
- net9.0;net8.0;net6.0
+ net10.0;net9.0;net8.0
enable
enable
+
-