diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index c2207a7..22419cc 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -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 diff --git a/Directory.Packages.props b/Directory.Packages.props index 7d68c18..109411b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -35,7 +35,7 @@ - + diff --git a/src/AppCoreNet.EventStore.SqlServer/DependencyInjection/SqlServerEventStoreBuilderExtensions.cs b/src/AppCoreNet.EventStore.SqlServer/DependencyInjection/SqlServerEventStoreBuilderExtensions.cs index 595c4b6..c32b61f 100644 --- a/src/AppCoreNet.EventStore.SqlServer/DependencyInjection/SqlServerEventStoreBuilderExtensions.cs +++ b/src/AppCoreNet.EventStore.SqlServer/DependencyInjection/SqlServerEventStoreBuilderExtensions.cs @@ -107,12 +107,12 @@ public static IEventStoreBuilder AddSqlServer( /// /// Registers the SQL server based event store for the data provider. /// - /// The . + /// The . /// Delegate used to configure the SQL server event store. /// The type of the . - /// The which allows chaining of method calls. - public static DbContextDataProviderBuilder AddSqlServerEventStore( - this DbContextDataProviderBuilder builder, + /// The which allows chaining of method calls. + public static EntityFrameworkCoreDataProviderBuilder AddSqlServerEventStore( + this EntityFrameworkCoreDataProviderBuilder builder, Action? configureOptions = null) where TDbContext : DbContext { @@ -125,12 +125,12 @@ public static DbContextDataProviderBuilder AddSqlServerEventStore /// Registers the SQL server based event store for the data provider. /// - /// The . + /// The . /// Delegate used to configure the SQL server event store. /// The type of the . - /// The which allows chaining of method calls. - public static DbContextDataProviderBuilder AddSqlServerEventStore( - this DbContextDataProviderBuilder builder, + /// The which allows chaining of method calls. + public static EntityFrameworkCoreDataProviderBuilder AddSqlServerEventStore( + this EntityFrameworkCoreDataProviderBuilder builder, Action configureOptions) where TDbContext : DbContext { diff --git a/test/AppCoreNet.EventStore.SqlServer.Tests/SqlServerEventStoreTests.cs b/test/AppCoreNet.EventStore.SqlServer.Tests/SqlServerEventStoreTests.cs index 4a2fd32..8eff70d 100644 --- a/test/AppCoreNet.EventStore.SqlServer.Tests/SqlServerEventStoreTests.cs +++ b/test/AppCoreNet.EventStore.SqlServer.Tests/SqlServerEventStoreTests.cs @@ -38,7 +38,7 @@ protected override void ConfigureServices(IServiceCollection services) services.AddDataProvider( p => { - p.AddDbContext( + p.AddEntityFrameworkCore( o => { o.UseSqlServer(_sqlServerTestFixture.ConnectionString); diff --git a/test/AppCoreNet.EventStore.SqlServer.Tests/Subscriptions/SqlServerSubscriptionStoreTests.cs b/test/AppCoreNet.EventStore.SqlServer.Tests/Subscriptions/SqlServerSubscriptionStoreTests.cs index 9a21c95..989ed21 100644 --- a/test/AppCoreNet.EventStore.SqlServer.Tests/Subscriptions/SqlServerSubscriptionStoreTests.cs +++ b/test/AppCoreNet.EventStore.SqlServer.Tests/Subscriptions/SqlServerSubscriptionStoreTests.cs @@ -34,7 +34,7 @@ protected override void ConfigureServices(IServiceCollection services) services.AddDataProvider( p => { - p.AddDbContext( + p.AddEntityFrameworkCore( o => { o.UseSqlServer(_sqlServerTestFixture.ConnectionString);