Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<Project>
<PropertyGroup>

<GrpcVersion>2.71.0</GrpcVersion>
<GoogleProtobufVersion>3.32.0</GoogleProtobufVersion>
<GrpcVersion>2.80.0</GrpcVersion>
<GoogleProtobufVersion>3.35.1</GoogleProtobufVersion>

<EfCoreVersionForNet9>9.0.8</EfCoreVersionForNet9>
<EfCoreVersionForNet8>8.0.19</EfCoreVersionForNet8>
<EfCoreVersionForNet6>6.0.36</EfCoreVersionForNet6>
<EfCoreVersionForNet10>10.0.9</EfCoreVersionForNet10>
<EfCoreVersionForNet9>9.0.17</EfCoreVersionForNet9>
<EfCoreVersionForNet8>8.0.28</EfCoreVersionForNet8>

<DapperVersion>2.1.66</DapperVersion>
<MongoDbDriverVersion>3.4.3</MongoDbDriverVersion>
<DapperVersion>2.1.79</DapperVersion>
<MongoDbDriverVersion>3.9.0</MongoDbDriverVersion>
<Mongo2GoVersion>4.1.0</Mongo2GoVersion>

<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
<NewtonsoftJsonVersion>13.0.4</NewtonsoftJsonVersion>

<MicrosoftPackagesVersion>9.0.8</MicrosoftPackagesVersion>
<MicrosoftNetTestSdkVersion>17.13.0</MicrosoftNetTestSdkVersion>
<MicrosoftPackagesVersion>10.0.9</MicrosoftPackagesVersion>
<MicrosoftNetTestSdkVersion>18.6.0</MicrosoftNetTestSdkVersion>

<DistributedLockCoreVersion>1.0.8</DistributedLockCoreVersion>
<DistributedLockCoreVersion>1.0.9</DistributedLockCoreVersion>

</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.4.0</Version>
<Version>1.5.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<Authors>Stepping</Authors>
<Company>Stepping</Company>
Expand All @@ -17,7 +17,7 @@
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)/icon.png" Pack="true" PackagePath="/" Visible="false"/>
<None Include="$(MSBuildThisFileDirectory)/docs/README.md" Pack="true" PackagePath="/" Visible="false"/>
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.2" PrivateAssets="All"/>
<PackageReference Include="ConfigureAwait.Fody" Version="3.4.1" PrivateAssets="All"/>
<PackageReference Include="Fody" Version="6.9.3">
<PrivateAssets>All</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
4 changes: 2 additions & 2 deletions common.testing.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand All @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PackageReference Include="coverlet.collector" Version="10.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
Expand All @@ -15,9 +15,9 @@

<ItemGroup>
<PackageReference Include="Dapper" Version="$(DapperVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet10)" Condition="'$(TargetFramework)' == 'net10.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet9)" Condition="'$(TargetFramework)' == 'net9.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet8)" Condition="'$(TargetFramework)' == 'net8.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet6)" Condition="'$(TargetFramework)' == 'net6.0'"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected virtual async Task<DtmRequest> 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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
Expand All @@ -14,9 +14,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet10)" Condition="'$(TargetFramework)' == 'net10.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet9)" Condition="'$(TargetFramework)' == 'net9.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet8)" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfCoreVersionForNet6)" Condition="'$(TargetFramework)' == 'net6.0'" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<Import Project="..\..\common.testing.props"/>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet10)" Condition="'$(TargetFramework)' == 'net10.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet9)" Condition="'$(TargetFramework)' == 'net9.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet8)" Condition="'$(TargetFramework)' == 'net8.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet6)" Condition="'$(TargetFramework)' == 'net6.0'"/>

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)"/>
<ProjectReference Include="..\..\src\Stepping.DbProviders.EfCore\Stepping.DbProviders.EfCore.csproj"/>
Expand Down
2 changes: 1 addition & 1 deletion test/Stepping.TestBase/Stepping.TestBase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="Shouldly" Version="4.3.0"/>
<PackageReference Include="xunit" Version="2.9.3"/>
<PackageReference Include="xunit.extensibility.execution" Version="2.9.3"/>
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4"/>
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5"/>
<ProjectReference Include="..\..\src\Stepping.Core\Stepping.Core.csproj"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<FakeExecutableStep>();

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<FakeExecutableStep>();

await FakeDtmGrpcTmClient.PrepareAsync(job);

var headers = FakeDtmGrpcTmClient.LastInvoking!.Value.Item2.TransOptions.BranchHeaders;
headers.ShouldNotContainKey(DtmRequestHeaderNames.ActionApiToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<Import Project="..\..\common.testing.props"/>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet10)" Condition="'$(TargetFramework)' == 'net10.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet9)" Condition="'$(TargetFramework)' == 'net9.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet8)" Condition="'$(TargetFramework)' == 'net8.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet6)" Condition="'$(TargetFramework)' == 'net6.0'"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)"/>
<ProjectReference Include="..\..\src\Stepping.TmProviders.LocalTm.EfCore\Stepping.TmProviders.LocalTm.EfCore.csproj"/>
<ProjectReference Include="..\Stepping.TestBase\Stepping.TestBase.csproj"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet10)" Condition="'$(TargetFramework)' == 'net10.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet9)" Condition="'$(TargetFramework)' == 'net9.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet8)" Condition="'$(TargetFramework)' == 'net8.0'"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EfCoreVersionForNet6)" Condition="'$(TargetFramework)' == 'net6.0'"/>
<ProjectReference Include="..\..\src\Stepping.TmProviders.LocalTm.EfCore\Stepping.TmProviders.LocalTm.EfCore.csproj" />
<ProjectReference Include="..\..\src\Stepping.TmProviders.LocalTm\Stepping.TmProviders.LocalTm.csproj" />
</ItemGroup>
Expand Down
Loading