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
27 changes: 27 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,33 @@ jobs:
path: ./test-results
if: ${{ always() }} # Always run this step even on failure

integration-tests:
runs-on: ubuntu-latest
needs: build
name: Integration Tests
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: Set BUILD_CONFIGURATION
if: startsWith(github.ref, 'refs/tags/')
run: echo "BUILD_CONFIGURATION=Release" >> $GITHUB_ENV
- name: Restore
run: dotnet restore
- name: Run Integration Tests
run: dotnet test --configuration ${{env.BUILD_CONFIGURATION}} --filter "Category=Integration" --logger trx --results-directory integration-test-results
- name: Upload integration test results
uses: actions/upload-artifact@v4
with:
name: integration-test-results
path: ./integration-test-results

deploy-testing:
if: github.event_name == 'push'
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.17" />

<PackageVersion Include="AppCoreNet.Extensions.DependencyInjection.Abstractions" Version="0.7.0" />
<PackageVersion Include="AppCoreNet.Data.EntityFrameworkCore" Version="0.6.0" />
<PackageVersion Include="AppCoreNet.Data.EntityFrameworkCore" Version="0.7.0" />

<PackageVersion Include="Testcontainers.MsSql" Version="4.6.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ public static IEventStoreBuilder AddSqlServer<TDbContext>(
/// <summary>
/// Registers the SQL server based event store for the data provider.
/// </summary>
/// <param name="builder">The <see cref="DbContextDataProviderBuilder{TDbContext}"/>.</param>
/// <param name="builder">The <see cref="EntityFrameworkCoreDataProviderBuilder{TDbContext}"/>.</param>
/// <param name="configureOptions">Delegate used to configure the SQL server event store.</param>
/// <typeparam name="TDbContext">The type of the <see cref="DbContext"/>.</typeparam>
/// <returns>The <see cref="DbContextDataProviderBuilder{TDbContext}"/> which allows chaining of method calls.</returns>
public static DbContextDataProviderBuilder<TDbContext> AddSqlServerEventStore<TDbContext>(
this DbContextDataProviderBuilder<TDbContext> builder,
/// <returns>The <see cref="EntityFrameworkCoreDataProviderBuilder{TDbContext}"/> which allows chaining of method calls.</returns>
public static EntityFrameworkCoreDataProviderBuilder<TDbContext> AddSqlServerEventStore<TDbContext>(
this EntityFrameworkCoreDataProviderBuilder<TDbContext> builder,
Action<IServiceProvider, SqlServerEventStoreOptions>? configureOptions = null)
where TDbContext : DbContext
{
Expand All @@ -125,12 +125,12 @@ public static DbContextDataProviderBuilder<TDbContext> AddSqlServerEventStore<TD
/// <summary>
/// Registers the SQL server based event store for the data provider.
/// </summary>
/// <param name="builder">The <see cref="DbContextDataProviderBuilder{TDbContext}"/>.</param>
/// <param name="builder">The <see cref="EntityFrameworkCoreDataProviderBuilder{TDbContext}"/>.</param>
/// <param name="configureOptions">Delegate used to configure the SQL server event store.</param>
/// <typeparam name="TDbContext">The type of the <see cref="DbContext"/>.</typeparam>
/// <returns>The <see cref="DbContextDataProviderBuilder{TDbContext}"/> which allows chaining of method calls.</returns>
public static DbContextDataProviderBuilder<TDbContext> AddSqlServerEventStore<TDbContext>(
this DbContextDataProviderBuilder<TDbContext> builder,
/// <returns>The <see cref="EntityFrameworkCoreDataProviderBuilder{TDbContext}"/> which allows chaining of method calls.</returns>
public static EntityFrameworkCoreDataProviderBuilder<TDbContext> AddSqlServerEventStore<TDbContext>(
this EntityFrameworkCoreDataProviderBuilder<TDbContext> builder,
Action<SqlServerEventStoreOptions> configureOptions)
where TDbContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected override void ConfigureServices(IServiceCollection services)
services.AddDataProvider(
p =>
{
p.AddDbContext<TestDbContext>(
p.AddEntityFrameworkCore<TestDbContext>(
o =>
{
o.UseSqlServer(_sqlServerTestFixture.ConnectionString);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected override void ConfigureServices(IServiceCollection services)
services.AddDataProvider(
p =>
{
p.AddDbContext<TestDbContext>(
p.AddEntityFrameworkCore<TestDbContext>(
o =>
{
o.UseSqlServer(_sqlServerTestFixture.ConnectionString);
Expand Down