From 35acbc28d26a4b76f0ebaf4902fab0ee86c703be Mon Sep 17 00:00:00 2001 From: "Rian.be" Date: Wed, 1 Jul 2026 14:31:26 +0200 Subject: [PATCH 1/5] Split PR checks into explicit job groups --- .github/workflows/pr-check.yml | 121 ++++++++++++++++++ ...ionRequestApprovalWorkflowApprovalTests.cs | 2 +- ...ationRequestApprovalWorkflowTestSupport.cs | 54 ++++++++ 3 files changed, 176 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 2484cae..26f2194 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -10,6 +10,7 @@ permissions: jobs: build: + name: build (${{ matrix.configuration }}) runs-on: ubuntu-latest strategy: @@ -29,3 +30,123 @@ jobs: - name: Build ${{ matrix.configuration }} run: dotnet build ModularityKit.Mutator.slnx -c ${{ matrix.configuration }} --no-restore + + tests: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - name: test:core + command: dotnet test Tests/ModularityKit.Mutator.Tests/ModularityKit.Mutator.Tests.csproj -c Release --no-restore + - name: test:governance + command: dotnet test Tests/ModularityKit.Mutator.Governance.Tests/ModularityKit.Mutator.Governance.Tests.csproj -c Release --no-restore + - name: test:governance-redis + command: dotnet test Tests/ModularityKit.Mutator.Governance.Redis.Tests/ModularityKit.Mutator.Governance.Redis.Tests.csproj -c Release --no-restore + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + + - name: Run ${{ matrix.name }} + run: ${{ matrix.command }} + + examples-core: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - name: examples:core / BillingQuotas + command: dotnet run --project Examples/Core/BillingQuotas/BillingQuotas.csproj -c Release --no-restore + - name: examples:core / FeatureFlags + command: dotnet run --project Examples/Core/FeatureFlags/FeatureFlags.csproj -c Release --no-restore + - name: examples:core / IamRoles + command: dotnet run --project Examples/Core/IamRoles/IamRoles.csproj -c Release --no-restore + - name: examples:core / WorkflowApprovals + command: dotnet run --project Examples/Core/WorkflowApprovals/WorkflowApprovals.csproj -c Release --no-restore + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + + - name: Run ${{ matrix.name }} + run: ${{ matrix.command }} + + examples-governance: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - name: examples:governance / RequestLifecycle + command: dotnet run --project Examples/Governance/RequestLifecycle/RequestLifecycle.csproj -c Release --no-restore + - name: examples:governance / GovernedExecution + command: dotnet run --project Examples/Governance/GovernedExecution/GovernedExecution.csproj -c Release --no-restore + - name: examples:governance / DecisionTaxonomy + command: dotnet run --project Examples/Governance/DecisionTaxonomy/DecisionTaxonomy.csproj -c Release --no-restore + - name: examples:governance / ApprovalWorkflow + command: dotnet run --project Examples/Governance/ApprovalWorkflow/ApprovalWorkflow.csproj -c Release --no-restore + - name: examples:governance / VersionedResolution + command: dotnet run --project Examples/Governance/VersionedResolution/VersionedResolution.csproj -c Release --no-restore + - name: examples:governance / Queries + command: dotnet run --project Examples/Governance/Queries/Queries.csproj -c Release --no-restore + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + + - name: Run ${{ matrix.name }} + run: ${{ matrix.command }} + + examples-governance-redis: + name: examples:governance / RedisQueries + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + + - name: Start Redis + working-directory: Examples/Governance/RedisQueries + run: docker compose up -d + + - name: Run RedisQueries + env: + MODULARITYKIT_REDIS: localhost:6379 + run: dotnet run --project Examples/Governance/RedisQueries/RedisQueries.csproj -c Release --no-restore + + - name: Stop Redis + if: ${{ always() }} + working-directory: Examples/Governance/RedisQueries + run: docker compose down diff --git a/Tests/ModularityKit.Mutator.Governance.Tests/Approval/MutationRequestApprovalWorkflowApprovalTests.cs b/Tests/ModularityKit.Mutator.Governance.Tests/Approval/MutationRequestApprovalWorkflowApprovalTests.cs index d4b9704..55c3b69 100644 --- a/Tests/ModularityKit.Mutator.Governance.Tests/Approval/MutationRequestApprovalWorkflowApprovalTests.cs +++ b/Tests/ModularityKit.Mutator.Governance.Tests/Approval/MutationRequestApprovalWorkflowApprovalTests.cs @@ -16,7 +16,7 @@ public void PendingApproval_maps_id_role_group_quorum_and_expiration_targets() { var expiresAt = DateTimeOffset.UtcNow.AddHours(1); - var request = MutationRequestApprovalWorkflowTestSupport.CreateLinearApprovalRequest(); + var request = MutationRequestApprovalWorkflowTestSupport.CreateTargetMappingApprovalRequest(expiresAt); Assert.Equal(MutationRequestStatus.Pending, request.Status); Assert.Equal(PendingMutationReason.Approval, request.PendingReason); diff --git a/Tests/ModularityKit.Mutator.Governance.Tests/TestSupport/Approval/Workflow/MutationRequestApprovalWorkflowTestSupport.cs b/Tests/ModularityKit.Mutator.Governance.Tests/TestSupport/Approval/Workflow/MutationRequestApprovalWorkflowTestSupport.cs index 905424f..756c666 100644 --- a/Tests/ModularityKit.Mutator.Governance.Tests/TestSupport/Approval/Workflow/MutationRequestApprovalWorkflowTestSupport.cs +++ b/Tests/ModularityKit.Mutator.Governance.Tests/TestSupport/Approval/Workflow/MutationRequestApprovalWorkflowTestSupport.cs @@ -29,6 +29,60 @@ public static MutationRequest CreateLinearApprovalRequest() expectedStateVersion: "v10"); } + /// + /// Creates a request that exercises approval mapping for manager, quorum, role, and group targets. + /// + public static MutationRequest CreateTargetMappingApprovalRequest(DateTimeOffset expiresAt) + { + return MutationRequestFactory.PendingApproval( + stateId: "tenant-42:roles", + stateType: "IamRoleState", + mutationType: "GrantRoleMutation", + intent: CreateIntent(), + context: MutationContext.User("requester", "Requester", "Needs privileged access"), + requirements: + [ + PolicyRequirement.Approval("alice", "Manager approval"), + new PolicyRequirement + { + Type = "Approval", + Description = "Security quorum", + Data = new + { + Approvers = new[] { "bob", "carol", "dave" }, + StepOrder = 2, + ApprovalGroupId = "security-quorum", + Quorum = 2, + ExpiresAt = expiresAt, + Reason = "Security sign-off" + } + }, + new PolicyRequirement + { + Type = "Approval", + Description = "Finance role approval", + Data = new + { + ApproverRole = "finance-approver", + StepOrder = 3, + Reason = "Finance sign-off" + } + }, + new PolicyRequirement + { + Type = "Approval", + Description = "Operations group approval", + Data = new + { + ApproverGroup = "ops-oncall", + StepOrder = 4, + Reason = "Operations sign-off" + } + } + ], + expectedStateVersion: "v10"); + } + /// /// Creates a request that exercises quorum-based approval requirements. /// From 7f63aab8c2d2f158de600588a6153523366e2a37 Mon Sep 17 00:00:00 2001 From: "Rian.be" Date: Wed, 1 Jul 2026 14:47:56 +0200 Subject: [PATCH 2/5] Run PR checks only on pull requests --- .github/workflows/pr-check.yml | 110 ++++++++++++++------------------- 1 file changed, 45 insertions(+), 65 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 26f2194..297329c 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -2,8 +2,6 @@ name: PR Check on: pull_request: - push: - branches: [ main, master, develop ] permissions: contents: read @@ -31,9 +29,10 @@ jobs: - name: Build ${{ matrix.configuration }} run: dotnet build ModularityKit.Mutator.slnx -c ${{ matrix.configuration }} --no-restore - tests: + validate: name: ${{ matrix.name }} runs-on: ubuntu-latest + needs: build strategy: fail-fast: false @@ -41,74 +40,47 @@ jobs: include: - name: test:core command: dotnet test Tests/ModularityKit.Mutator.Tests/ModularityKit.Mutator.Tests.csproj -c Release --no-restore + redis: false - name: test:governance command: dotnet test Tests/ModularityKit.Mutator.Governance.Tests/ModularityKit.Mutator.Governance.Tests.csproj -c Release --no-restore + redis: false - name: test:governance-redis command: dotnet test Tests/ModularityKit.Mutator.Governance.Redis.Tests/ModularityKit.Mutator.Governance.Redis.Tests.csproj -c Release --no-restore - - steps: - - uses: actions/checkout@v5 - - - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 10.0.x - - - name: Restore - run: dotnet restore ModularityKit.Mutator.slnx - - - name: Run ${{ matrix.name }} - run: ${{ matrix.command }} - - examples-core: - name: ${{ matrix.name }} - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - include: + redis: false - name: examples:core / BillingQuotas command: dotnet run --project Examples/Core/BillingQuotas/BillingQuotas.csproj -c Release --no-restore + redis: false - name: examples:core / FeatureFlags command: dotnet run --project Examples/Core/FeatureFlags/FeatureFlags.csproj -c Release --no-restore + redis: false - name: examples:core / IamRoles command: dotnet run --project Examples/Core/IamRoles/IamRoles.csproj -c Release --no-restore + redis: false - name: examples:core / WorkflowApprovals command: dotnet run --project Examples/Core/WorkflowApprovals/WorkflowApprovals.csproj -c Release --no-restore - - steps: - - uses: actions/checkout@v5 - - - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 10.0.x - - - name: Restore - run: dotnet restore ModularityKit.Mutator.slnx - - - name: Run ${{ matrix.name }} - run: ${{ matrix.command }} - - examples-governance: - name: ${{ matrix.name }} - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - include: + redis: false - name: examples:governance / RequestLifecycle command: dotnet run --project Examples/Governance/RequestLifecycle/RequestLifecycle.csproj -c Release --no-restore + redis: false - name: examples:governance / GovernedExecution command: dotnet run --project Examples/Governance/GovernedExecution/GovernedExecution.csproj -c Release --no-restore + redis: false - name: examples:governance / DecisionTaxonomy command: dotnet run --project Examples/Governance/DecisionTaxonomy/DecisionTaxonomy.csproj -c Release --no-restore + redis: false - name: examples:governance / ApprovalWorkflow command: dotnet run --project Examples/Governance/ApprovalWorkflow/ApprovalWorkflow.csproj -c Release --no-restore + redis: false - name: examples:governance / VersionedResolution command: dotnet run --project Examples/Governance/VersionedResolution/VersionedResolution.csproj -c Release --no-restore + redis: false - name: examples:governance / Queries command: dotnet run --project Examples/Governance/Queries/Queries.csproj -c Release --no-restore + redis: false + - name: examples:governance / RedisQueries + command: dotnet run --project Examples/Governance/RedisQueries/RedisQueries.csproj -c Release --no-restore + redis: true + redis_workdir: Examples/Governance/RedisQueries steps: - uses: actions/checkout@v5 @@ -121,32 +93,40 @@ jobs: run: dotnet restore ModularityKit.Mutator.slnx - name: Run ${{ matrix.name }} + if: ${{ !matrix.redis }} run: ${{ matrix.command }} - examples-governance-redis: - name: examples:governance / RedisQueries - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v5 - - - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 10.0.x - - - name: Restore - run: dotnet restore ModularityKit.Mutator.slnx - - name: Start Redis - working-directory: Examples/Governance/RedisQueries + if: ${{ matrix.redis }} + working-directory: ${{ matrix.redis_workdir }} run: docker compose up -d - name: Run RedisQueries + if: ${{ matrix.redis }} env: MODULARITYKIT_REDIS: localhost:6379 - run: dotnet run --project Examples/Governance/RedisQueries/RedisQueries.csproj -c Release --no-restore + run: ${{ matrix.command }} - name: Stop Redis - if: ${{ always() }} - working-directory: Examples/Governance/RedisQueries + if: ${{ always() && matrix.redis }} + working-directory: ${{ matrix.redis_workdir }} run: docker compose down + + validation-summary: + name: validation summary + runs-on: ubuntu-latest + needs: + - build + - validate + if: always() + + steps: + - name: Report job results + run: | + echo "build: ${{ needs.build.result }}" + echo "validate: ${{ needs.validate.result }}" + + if [ "${{ needs.build.result }}" != "success" ] || \ + [ "${{ needs.validate.result }}" != "success" ]; then + exit 1 + fi From f4f2b40b7f65c99bfe9ae2218c088d5d2c11b46e Mon Sep 17 00:00:00 2001 From: "Rian.be" Date: Wed, 1 Jul 2026 14:39:01 +0200 Subject: [PATCH 3/5] Split example checks into a separate workflow --- .github/workflows/examples-check.yml | 102 +++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/examples-check.yml diff --git a/.github/workflows/examples-check.yml b/.github/workflows/examples-check.yml new file mode 100644 index 0000000..bc369fa --- /dev/null +++ b/.github/workflows/examples-check.yml @@ -0,0 +1,102 @@ +name: Examples Check + +on: + pull_request: + push: + branches: [ main, master, develop ] + +permissions: + contents: read + +jobs: + examples-core: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - name: examples:core / BillingQuotas + command: dotnet run --project Examples/Core/BillingQuotas/BillingQuotas.csproj -c Release --no-restore + - name: examples:core / FeatureFlags + command: dotnet run --project Examples/Core/FeatureFlags/FeatureFlags.csproj -c Release --no-restore + - name: examples:core / IamRoles + command: dotnet run --project Examples/Core/IamRoles/IamRoles.csproj -c Release --no-restore + - name: examples:core / WorkflowApprovals + command: dotnet run --project Examples/Core/WorkflowApprovals/WorkflowApprovals.csproj -c Release --no-restore + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + + - name: Run ${{ matrix.name }} + run: ${{ matrix.command }} + + examples-governance: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - name: examples:governance / RequestLifecycle + command: dotnet run --project Examples/Governance/RequestLifecycle/RequestLifecycle.csproj -c Release --no-restore + - name: examples:governance / GovernedExecution + command: dotnet run --project Examples/Governance/GovernedExecution/GovernedExecution.csproj -c Release --no-restore + - name: examples:governance / DecisionTaxonomy + command: dotnet run --project Examples/Governance/DecisionTaxonomy/DecisionTaxonomy.csproj -c Release --no-restore + - name: examples:governance / ApprovalWorkflow + command: dotnet run --project Examples/Governance/ApprovalWorkflow/ApprovalWorkflow.csproj -c Release --no-restore + - name: examples:governance / VersionedResolution + command: dotnet run --project Examples/Governance/VersionedResolution/VersionedResolution.csproj -c Release --no-restore + - name: examples:governance / Queries + command: dotnet run --project Examples/Governance/Queries/Queries.csproj -c Release --no-restore + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + + - name: Run ${{ matrix.name }} + run: ${{ matrix.command }} + + examples-governance-redis: + name: examples:governance / RedisQueries + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + + - name: Start Redis + working-directory: Examples/Governance/RedisQueries + run: docker compose up -d + + - name: Run RedisQueries + env: + MODULARITYKIT_REDIS: localhost:6379 + run: dotnet run --project Examples/Governance/RedisQueries/RedisQueries.csproj -c Release --no-restore + + - name: Stop Redis + if: ${{ always() }} + working-directory: Examples/Governance/RedisQueries + run: docker compose down From a98fa84d6cb555a3b3bddddf2a9cb6c34395f063 Mon Sep 17 00:00:00 2001 From: "Rian.be" Date: Wed, 1 Jul 2026 14:41:35 +0200 Subject: [PATCH 4/5] Stage CI checks with dependent job graph --- .github/workflows/examples-check.yml | 102 --------------------------- 1 file changed, 102 deletions(-) delete mode 100644 .github/workflows/examples-check.yml diff --git a/.github/workflows/examples-check.yml b/.github/workflows/examples-check.yml deleted file mode 100644 index bc369fa..0000000 --- a/.github/workflows/examples-check.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Examples Check - -on: - pull_request: - push: - branches: [ main, master, develop ] - -permissions: - contents: read - -jobs: - examples-core: - name: ${{ matrix.name }} - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - include: - - name: examples:core / BillingQuotas - command: dotnet run --project Examples/Core/BillingQuotas/BillingQuotas.csproj -c Release --no-restore - - name: examples:core / FeatureFlags - command: dotnet run --project Examples/Core/FeatureFlags/FeatureFlags.csproj -c Release --no-restore - - name: examples:core / IamRoles - command: dotnet run --project Examples/Core/IamRoles/IamRoles.csproj -c Release --no-restore - - name: examples:core / WorkflowApprovals - command: dotnet run --project Examples/Core/WorkflowApprovals/WorkflowApprovals.csproj -c Release --no-restore - - steps: - - uses: actions/checkout@v5 - - - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 10.0.x - - - name: Restore - run: dotnet restore ModularityKit.Mutator.slnx - - - name: Run ${{ matrix.name }} - run: ${{ matrix.command }} - - examples-governance: - name: ${{ matrix.name }} - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - include: - - name: examples:governance / RequestLifecycle - command: dotnet run --project Examples/Governance/RequestLifecycle/RequestLifecycle.csproj -c Release --no-restore - - name: examples:governance / GovernedExecution - command: dotnet run --project Examples/Governance/GovernedExecution/GovernedExecution.csproj -c Release --no-restore - - name: examples:governance / DecisionTaxonomy - command: dotnet run --project Examples/Governance/DecisionTaxonomy/DecisionTaxonomy.csproj -c Release --no-restore - - name: examples:governance / ApprovalWorkflow - command: dotnet run --project Examples/Governance/ApprovalWorkflow/ApprovalWorkflow.csproj -c Release --no-restore - - name: examples:governance / VersionedResolution - command: dotnet run --project Examples/Governance/VersionedResolution/VersionedResolution.csproj -c Release --no-restore - - name: examples:governance / Queries - command: dotnet run --project Examples/Governance/Queries/Queries.csproj -c Release --no-restore - - steps: - - uses: actions/checkout@v5 - - - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 10.0.x - - - name: Restore - run: dotnet restore ModularityKit.Mutator.slnx - - - name: Run ${{ matrix.name }} - run: ${{ matrix.command }} - - examples-governance-redis: - name: examples:governance / RedisQueries - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v5 - - - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 10.0.x - - - name: Restore - run: dotnet restore ModularityKit.Mutator.slnx - - - name: Start Redis - working-directory: Examples/Governance/RedisQueries - run: docker compose up -d - - - name: Run RedisQueries - env: - MODULARITYKIT_REDIS: localhost:6379 - run: dotnet run --project Examples/Governance/RedisQueries/RedisQueries.csproj -c Release --no-restore - - - name: Stop Redis - if: ${{ always() }} - working-directory: Examples/Governance/RedisQueries - run: docker compose down From 971d25aa657dc099d9dce3d8bc5e10054800cc76 Mon Sep 17 00:00:00 2001 From: "Rian.be" Date: Wed, 1 Jul 2026 15:04:02 +0200 Subject: [PATCH 5/5] Split PR checks into category jobs --- .github/workflows/pr-check.yml | 106 ++++++++++++++++++++++++--------- 1 file changed, 78 insertions(+), 28 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 297329c..469015a 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -29,7 +29,7 @@ jobs: - name: Build ${{ matrix.configuration }} run: dotnet build ModularityKit.Mutator.slnx -c ${{ matrix.configuration }} --no-restore - validate: + tests: name: ${{ matrix.name }} runs-on: ubuntu-latest needs: build @@ -40,47 +40,76 @@ jobs: include: - name: test:core command: dotnet test Tests/ModularityKit.Mutator.Tests/ModularityKit.Mutator.Tests.csproj -c Release --no-restore - redis: false - name: test:governance command: dotnet test Tests/ModularityKit.Mutator.Governance.Tests/ModularityKit.Mutator.Governance.Tests.csproj -c Release --no-restore - redis: false - name: test:governance-redis command: dotnet test Tests/ModularityKit.Mutator.Governance.Redis.Tests/ModularityKit.Mutator.Governance.Redis.Tests.csproj -c Release --no-restore - redis: false + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + + - name: Run ${{ matrix.name }} + run: ${{ matrix.command }} + + examples-core: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + needs: build + + strategy: + fail-fast: false + matrix: + include: - name: examples:core / BillingQuotas command: dotnet run --project Examples/Core/BillingQuotas/BillingQuotas.csproj -c Release --no-restore - redis: false - name: examples:core / FeatureFlags command: dotnet run --project Examples/Core/FeatureFlags/FeatureFlags.csproj -c Release --no-restore - redis: false - name: examples:core / IamRoles command: dotnet run --project Examples/Core/IamRoles/IamRoles.csproj -c Release --no-restore - redis: false - name: examples:core / WorkflowApprovals command: dotnet run --project Examples/Core/WorkflowApprovals/WorkflowApprovals.csproj -c Release --no-restore - redis: false + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + + - name: Run ${{ matrix.name }} + run: ${{ matrix.command }} + + examples-governance: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + needs: build + + strategy: + fail-fast: false + matrix: + include: - name: examples:governance / RequestLifecycle command: dotnet run --project Examples/Governance/RequestLifecycle/RequestLifecycle.csproj -c Release --no-restore - redis: false - name: examples:governance / GovernedExecution command: dotnet run --project Examples/Governance/GovernedExecution/GovernedExecution.csproj -c Release --no-restore - redis: false - name: examples:governance / DecisionTaxonomy command: dotnet run --project Examples/Governance/DecisionTaxonomy/DecisionTaxonomy.csproj -c Release --no-restore - redis: false - name: examples:governance / ApprovalWorkflow command: dotnet run --project Examples/Governance/ApprovalWorkflow/ApprovalWorkflow.csproj -c Release --no-restore - redis: false - name: examples:governance / VersionedResolution command: dotnet run --project Examples/Governance/VersionedResolution/VersionedResolution.csproj -c Release --no-restore - redis: false - name: examples:governance / Queries command: dotnet run --project Examples/Governance/Queries/Queries.csproj -c Release --no-restore - redis: false - - name: examples:governance / RedisQueries - command: dotnet run --project Examples/Governance/RedisQueries/RedisQueries.csproj -c Release --no-restore - redis: true - redis_workdir: Examples/Governance/RedisQueries steps: - uses: actions/checkout@v5 @@ -93,23 +122,35 @@ jobs: run: dotnet restore ModularityKit.Mutator.slnx - name: Run ${{ matrix.name }} - if: ${{ !matrix.redis }} run: ${{ matrix.command }} + examples-governance-redis: + name: examples:governance / RedisQueries + runs-on: ubuntu-latest + needs: build + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore ModularityKit.Mutator.slnx + - name: Start Redis - if: ${{ matrix.redis }} - working-directory: ${{ matrix.redis_workdir }} + working-directory: Examples/Governance/RedisQueries run: docker compose up -d - name: Run RedisQueries - if: ${{ matrix.redis }} env: MODULARITYKIT_REDIS: localhost:6379 - run: ${{ matrix.command }} + run: dotnet run --project Examples/Governance/RedisQueries/RedisQueries.csproj -c Release --no-restore - name: Stop Redis - if: ${{ always() && matrix.redis }} - working-directory: ${{ matrix.redis_workdir }} + if: ${{ always() }} + working-directory: Examples/Governance/RedisQueries run: docker compose down validation-summary: @@ -117,16 +158,25 @@ jobs: runs-on: ubuntu-latest needs: - build - - validate + - tests + - examples-core + - examples-governance + - examples-governance-redis if: always() steps: - name: Report job results run: | echo "build: ${{ needs.build.result }}" - echo "validate: ${{ needs.validate.result }}" + echo "tests: ${{ needs.tests.result }}" + echo "examples-core: ${{ needs.examples-core.result }}" + echo "examples-governance: ${{ needs.examples-governance.result }}" + echo "examples-governance-redis: ${{ needs.examples-governance-redis.result }}" if [ "${{ needs.build.result }}" != "success" ] || \ - [ "${{ needs.validate.result }}" != "success" ]; then + [ "${{ needs.tests.result }}" != "success" ] || \ + [ "${{ needs.examples-core.result }}" != "success" ] || \ + [ "${{ needs.examples-governance.result }}" != "success" ] || \ + [ "${{ needs.examples-governance-redis.result }}" != "success" ]; then exit 1 fi