diff --git a/.github/workflows/nuget_release.yml b/.github/workflows/nuget_release.yml index ca54dcf..ace8ef4 100644 --- a/.github/workflows/nuget_release.yml +++ b/.github/workflows/nuget_release.yml @@ -45,6 +45,7 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.DOTNET_VERSION }} + dotnet-quality: preview - name: Install dependencies run: npm install diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 8f7b570..e54228b 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -16,6 +16,7 @@ jobs: - uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.DOTNET_VERSION }} + dotnet-quality: preview - run: dotnet tool restore - run: dotnet csharpier check . - run: dotnet build --configuration Release diff --git a/.gitignore b/.gitignore index 0b97633..2b888db 100644 --- a/.gitignore +++ b/.gitignore @@ -143,3 +143,6 @@ _NCrunch* BenchmarkDotNet.Artifacts/ # Semantic Release version file .release-version + +# Node modules (semantic-release) +node_modules/ diff --git a/tests/Trax.Dashboard.Tests.Integration/Fakes/FakeSchedulerTrains.cs b/tests/Trax.Dashboard.Tests.Integration/Fakes/Trains/FakeSchedulerTrains.cs similarity index 97% rename from tests/Trax.Dashboard.Tests.Integration/Fakes/FakeSchedulerTrains.cs rename to tests/Trax.Dashboard.Tests.Integration/Fakes/Trains/FakeSchedulerTrains.cs index 05b80d4..ad7fced 100644 --- a/tests/Trax.Dashboard.Tests.Integration/Fakes/FakeSchedulerTrains.cs +++ b/tests/Trax.Dashboard.Tests.Integration/Fakes/Trains/FakeSchedulerTrains.cs @@ -4,7 +4,7 @@ #pragma warning disable CS8766 // Nullability mismatch on Metadata property inherited from EffectTrain -namespace Trax.Dashboard.Tests.Integration.Fakes; +namespace Trax.Dashboard.Tests.Integration.Fakes.Trains; // --- Manifest-compatible fakes for scheduler builder tests --- // These satisfy TTrain : IServiceTrain where TInput : IManifestProperties diff --git a/tests/Trax.Dashboard.Tests.Integration/Fakes/FakeTrains.cs b/tests/Trax.Dashboard.Tests.Integration/Fakes/Trains/FakeTrains.cs similarity index 97% rename from tests/Trax.Dashboard.Tests.Integration/Fakes/FakeTrains.cs rename to tests/Trax.Dashboard.Tests.Integration/Fakes/Trains/FakeTrains.cs index 141f1b9..9b94ce7 100644 --- a/tests/Trax.Dashboard.Tests.Integration/Fakes/FakeTrains.cs +++ b/tests/Trax.Dashboard.Tests.Integration/Fakes/Trains/FakeTrains.cs @@ -3,7 +3,7 @@ #pragma warning disable CS8766 // Nullability mismatch on Metadata property inherited from EffectTrain -namespace Trax.Dashboard.Tests.Integration.Fakes; +namespace Trax.Dashboard.Tests.Integration.Fakes.Trains; // --- Simple train A --- public record FakeInputA; diff --git a/tests/Trax.Dashboard.Tests.Integration/AdminQueryFiltersTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/AdminQueryFiltersTests.cs similarity index 97% rename from tests/Trax.Dashboard.Tests.Integration/AdminQueryFiltersTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/AdminQueryFiltersTests.cs index 7fa1a73..db2c8df 100644 --- a/tests/Trax.Dashboard.Tests.Integration/AdminQueryFiltersTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/AdminQueryFiltersTests.cs @@ -3,7 +3,7 @@ using Trax.Effect.Models.Manifest; using Trax.Effect.Models.Metadata; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class AdminQueryFiltersTests diff --git a/tests/Trax.Dashboard.Tests.Integration/CyclicDependencyValidationTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/CyclicDependencyValidationTests.cs similarity index 97% rename from tests/Trax.Dashboard.Tests.Integration/CyclicDependencyValidationTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/CyclicDependencyValidationTests.cs index 48b2b19..1ab3db4 100644 --- a/tests/Trax.Dashboard.Tests.Integration/CyclicDependencyValidationTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/CyclicDependencyValidationTests.cs @@ -1,6 +1,6 @@ using FluentAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Dashboard.Tests.Integration.Fakes; +using Trax.Dashboard.Tests.Integration.Fakes.Trains; using Trax.Effect.Configuration.TraxBuilder; using Trax.Effect.Extensions; using Trax.Effect.Services.EffectRegistry; @@ -9,7 +9,7 @@ using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.Scheduling; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class CyclicDependencyValidationTests @@ -22,7 +22,8 @@ public void SetUp() { _services = new ServiceCollection(); var root = new TraxBuilder(_services, new EffectRegistry()); - _parentBuilder = root.AddEffects(_ => { }).AddMediator(); + _parentBuilder = root.AddEffects(effects => effects) + .AddMediator(typeof(IFakeSchedulerTrainA).Assembly); } #region Valid DAGs (no cycles) diff --git a/tests/Trax.Dashboard.Tests.Integration/DagLayoutEngineTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DagLayoutEngineTests.cs similarity index 98% rename from tests/Trax.Dashboard.Tests.Integration/DagLayoutEngineTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/DagLayoutEngineTests.cs index fe57a8a..7623cd3 100644 --- a/tests/Trax.Dashboard.Tests.Integration/DagLayoutEngineTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DagLayoutEngineTests.cs @@ -2,7 +2,7 @@ using Trax.Dashboard.Models; using Trax.Dashboard.Utilities; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class DagLayoutEngineTests diff --git a/tests/Trax.Dashboard.Tests.Integration/DagValidatorTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DagValidatorTests.cs similarity index 99% rename from tests/Trax.Dashboard.Tests.Integration/DagValidatorTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/DagValidatorTests.cs index feff0fe..84bf84a 100644 --- a/tests/Trax.Dashboard.Tests.Integration/DagValidatorTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DagValidatorTests.cs @@ -1,7 +1,7 @@ using FluentAssertions; using Trax.Scheduler.Utilities; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class DagValidatorTests diff --git a/tests/Trax.Dashboard.Tests.Integration/DashboardFormattersAdditionalTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardFormattersAdditionalTests.cs similarity index 97% rename from tests/Trax.Dashboard.Tests.Integration/DashboardFormattersAdditionalTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardFormattersAdditionalTests.cs index 414d087..8382dab 100644 --- a/tests/Trax.Dashboard.Tests.Integration/DashboardFormattersAdditionalTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardFormattersAdditionalTests.cs @@ -3,7 +3,7 @@ using Radzen; using Trax.Dashboard.Utilities; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class DashboardFormattersAdditionalTests diff --git a/tests/Trax.Dashboard.Tests.Integration/DashboardFormattersTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardFormattersTests.cs similarity index 99% rename from tests/Trax.Dashboard.Tests.Integration/DashboardFormattersTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardFormattersTests.cs index a3d2e39..d327d62 100644 --- a/tests/Trax.Dashboard.Tests.Integration/DashboardFormattersTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardFormattersTests.cs @@ -3,7 +3,7 @@ using Trax.Dashboard.Utilities; using Trax.Effect.Enums; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class DashboardFormattersTests diff --git a/tests/Trax.Dashboard.Tests.Integration/DashboardOptionsTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardOptionsTests.cs similarity index 87% rename from tests/Trax.Dashboard.Tests.Integration/DashboardOptionsTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardOptionsTests.cs index df551f8..cde5514 100644 --- a/tests/Trax.Dashboard.Tests.Integration/DashboardOptionsTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardOptionsTests.cs @@ -1,7 +1,7 @@ using FluentAssertions; using Trax.Dashboard.Configuration; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class DashboardOptionsTests diff --git a/tests/Trax.Dashboard.Tests.Integration/DashboardServiceExtensionsTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardServiceExtensionsTests.cs similarity index 97% rename from tests/Trax.Dashboard.Tests.Integration/DashboardServiceExtensionsTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardServiceExtensionsTests.cs index 77cdd75..f494c8e 100644 --- a/tests/Trax.Dashboard.Tests.Integration/DashboardServiceExtensionsTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardServiceExtensionsTests.cs @@ -5,7 +5,7 @@ using Trax.Effect.Configuration.TraxBuilder; using Trax.Mediator.Services.TrainDiscovery; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class DashboardServiceExtensionsTests diff --git a/tests/Trax.Dashboard.Tests.Integration/DashboardSettingsServiceTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardSettingsServiceTests.cs similarity index 98% rename from tests/Trax.Dashboard.Tests.Integration/DashboardSettingsServiceTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardSettingsServiceTests.cs index b48f341..457093f 100644 --- a/tests/Trax.Dashboard.Tests.Integration/DashboardSettingsServiceTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/DashboardSettingsServiceTests.cs @@ -2,7 +2,7 @@ using Trax.Dashboard.Services.DashboardSettings; using Trax.Dashboard.Services.LocalStorage; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class DashboardSettingsServiceTests diff --git a/tests/Trax.Dashboard.Tests.Integration/InferredSchedulingApiTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/InferredSchedulingApiTests.cs similarity index 98% rename from tests/Trax.Dashboard.Tests.Integration/InferredSchedulingApiTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/InferredSchedulingApiTests.cs index 38abe2a..52e4f44 100644 --- a/tests/Trax.Dashboard.Tests.Integration/InferredSchedulingApiTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/InferredSchedulingApiTests.cs @@ -1,6 +1,6 @@ using FluentAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Dashboard.Tests.Integration.Fakes; +using Trax.Dashboard.Tests.Integration.Fakes.Trains; using Trax.Effect.Configuration.TraxBuilder; using Trax.Effect.Extensions; using Trax.Effect.Services.EffectRegistry; @@ -10,7 +10,7 @@ using Trax.Scheduler.Extensions; using Trax.Scheduler.Services.Scheduling; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class InferredSchedulingApiTests @@ -23,7 +23,8 @@ public void SetUp() { _services = new ServiceCollection(); var root = new TraxBuilder(_services, new EffectRegistry()); - _parentBuilder = root.AddEffects(_ => { }).AddMediator(); + _parentBuilder = root.AddEffects(effects => effects) + .AddMediator(typeof(IFakeSchedulerTrainA).Assembly); } #region Single-type-param: Schedule, Include, ThenInclude @@ -469,6 +470,8 @@ public void IncludeMany_CrossGroupCycle_ThrowsInvalidOperationException() new FakeManifestInputD(), options => options.Group("group-a") ); + + return scheduler; }); act.Should().Throw().WithMessage("*Circular dependency*"); diff --git a/tests/Trax.Dashboard.Tests.Integration/TrainBusIntegrationTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/TrainBusIntegrationTests.cs similarity index 84% rename from tests/Trax.Dashboard.Tests.Integration/TrainBusIntegrationTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/TrainBusIntegrationTests.cs index 04b81bf..8b18e60 100644 --- a/tests/Trax.Dashboard.Tests.Integration/TrainBusIntegrationTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/TrainBusIntegrationTests.cs @@ -1,12 +1,12 @@ using FluentAssertions; using Microsoft.Extensions.DependencyInjection; using Trax.Dashboard.Extensions; -using Trax.Dashboard.Tests.Integration.Fakes; +using Trax.Dashboard.Tests.Integration.Fakes.Trains; using Trax.Effect.Extensions; using Trax.Mediator.Extensions; using Trax.Mediator.Services.TrainDiscovery; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class TrainBusIntegrationTests @@ -18,7 +18,8 @@ public void DiscoverTrains_WithEffectTrainBus_FindsAssemblyScannedTrains() var services = new ServiceCollection(); services.AddTrax(trax => - trax.AddEffects(_ => { }).AddMediator(assemblies: [typeof(FakeTrainA).Assembly]) + trax.AddEffects(effects => effects) + .AddMediator(assemblies: [typeof(FakeTrainA).Assembly]) ); services.AddTraxDashboard(); diff --git a/tests/Trax.Dashboard.Tests.Integration/TrainDiscoveryServiceTests.cs b/tests/Trax.Dashboard.Tests.Integration/UnitTests/TrainDiscoveryServiceTests.cs similarity index 98% rename from tests/Trax.Dashboard.Tests.Integration/TrainDiscoveryServiceTests.cs rename to tests/Trax.Dashboard.Tests.Integration/UnitTests/TrainDiscoveryServiceTests.cs index 665ac3b..de26687 100644 --- a/tests/Trax.Dashboard.Tests.Integration/TrainDiscoveryServiceTests.cs +++ b/tests/Trax.Dashboard.Tests.Integration/UnitTests/TrainDiscoveryServiceTests.cs @@ -1,10 +1,10 @@ using FluentAssertions; using Microsoft.Extensions.DependencyInjection; -using Trax.Dashboard.Tests.Integration.Fakes; +using Trax.Dashboard.Tests.Integration.Fakes.Trains; using Trax.Effect.Extensions; using Trax.Mediator.Services.TrainDiscovery; -namespace Trax.Dashboard.Tests.Integration; +namespace Trax.Dashboard.Tests.Integration.UnitTests; [TestFixture] public class TrainDiscoveryServiceTests