Skip to content

Commit db07869

Browse files
committed
ci: prepare native Aspire runtime in cluster jobs
Resolve DCP and dashboard through the installed Aspire SDK target after restoring the shared build outputs. NuGet restore does not install the separate CLI bundle stamped into the AppHost assembly metadata. Keep one solution build and run all test projects with --no-build. Validation: native SDK target invocation, actionlint, single-build check, repository governance and git diff --check. Linux execution pending CI.
1 parent 764885c commit db07869

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/build-and-tests.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ jobs:
221221
run: |
222222
tar -xzf artifacts/compiled-solution.tar.gz -C "$GITHUB_WORKSPACE"
223223
dotnet restore KeyLoad.slnx
224+
- name: Prepare Aspire runtime
225+
run: dotnet msbuild build/KeyLoad.AppHost/KeyLoad.AppHost.csproj -target:ResolveAspireCliBundlePaths -property:Configuration="$KEYLOAD_TEST_CONFIGURATION" -warnaserror
224226
- name: Install administration browser
225227
if: ${{ matrix.playwright }}
226228
shell: pwsh

‎docs/ADR/ADR-148-parallel-ci-shards.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Build and Tests is a set of parallel jobs driven by one checked-in manifest, `sc
2323
- Every lane has its own runner's network namespace. Aspire allocates every endpoint automatically; a different lane cannot claim an endpoint temporarily released by a killed server. Local whole-group execution joins each lane before starting the next.
2424
- **Verify test partition:** reads every shard's TRX artifact and proves that each test ran exactly once, in its assigned shard and lane.
2525

26-
The Build job compiles the whole solution once with `-warnaserror` in Release and completes the compiled inventory checks before any test job starts. A single-project build is not enough: unit CodeQuality checks read every solution project's image, and cold bootstrap launches the KeyLoad CLI, which no test project references. Build archives each project's `bin/Release` and `obj` directories; tar preserves executable permissions and hidden runtime assets. Test jobs depend on that successful Build, download its archive, restore NuGet execution dependencies and run with `--no-build`. The existing setup-dotnet cache is keyed by the central package file, SDK selection and project files. Each test job uploads its original TRX reports even when tests fail. The Release workflow calls Build and Tests through `workflow_call` and gates every publishing job on it.
26+
The Build job compiles the whole solution once with `-warnaserror` in Release and completes the compiled inventory checks before any test job starts. A single-project build is not enough: unit CodeQuality checks read every solution project's image, and cold bootstrap launches the KeyLoad CLI, which no test project references. Build archives each project's `bin/Release` and `obj` directories; tar preserves executable permissions and hidden runtime assets. Test jobs depend on that successful Build, download its archive, restore NuGet execution dependencies and run with `--no-build`. Cluster jobs also run the installed Aspire SDK's `ResolveAspireCliBundlePaths` target to prepare DCP and dashboard dependencies outside NuGet without compiling projects. The existing setup-dotnet cache is keyed by the central package file, SDK selection and project files. Each test job uploads its original TRX reports even when tests fail. The Release workflow calls Build and Tests through `workflow_call` and gates every publishing job on it.
2727

2828
Local development stays on the SDK default Debug configuration. CI sets
2929
`KEYLOAD_TEST_CONFIGURATION=Release`; runner selection, framework IPC, child

‎docs/Features/TestInfrastructure.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Whole regression: existing ImagesProduceClosedManifestAndRejectTamperingWithoutR
159159
| Named cluster capability groups | one lane per isolated GitHub runner | each lane is its own `dotnet test` process, `--maximum-parallel-tests 1 --timeout 45m`, class or method alternation under `/KeyLoad.ClusterTests/*/` |
160160
| Verify test partition | every shard's TRX artifact | `ci-test-shards.mjs verify TestResults` |
161161

162-
Build runs `dotnet build KeyLoad.slnx --configuration Release -warnaserror` once and completes compiled inventory checks before planning or test execution. It archives every solution project's `bin/Release` and `obj` directories, retaining executable modes and hidden runtime assets. Test jobs depend on Build, download those same outputs, restore NuGet execution dependencies and run with `--no-build`. The complete solution is required because ProductionSourceManifestOperationTests reads every project's image and ColdBootstrapSdkTests launches the CLI. Local development uses the SDK default Debug configuration. Each job writes original TRX reports below its test assembly's `bin/Release/net10.0/ci-results/<suite>/<shard>/<lane or namespace>` and uploads them even when tests fail. The filters pin the assembly segment, so process recovery tests registered by the functional host run only in the process crash recovery shard.
162+
Build runs `dotnet build KeyLoad.slnx --configuration Release -warnaserror` once and completes compiled inventory checks before planning or test execution. It archives every solution project's `bin/Release` and `obj` directories, retaining executable modes and hidden runtime assets. Test jobs depend on Build, download those same outputs, restore NuGet execution dependencies and run with `--no-build`. Cluster jobs prepare the separate DCP and dashboard bundle through the installed Aspire SDK's `ResolveAspireCliBundlePaths` target; that target does not compile projects. The complete solution is required because ProductionSourceManifestOperationTests reads every project's image and ColdBootstrapSdkTests launches the CLI. Local development uses the SDK default Debug configuration. Each job writes original TRX reports below its test assembly's `bin/Release/net10.0/ci-results/<suite>/<shard>/<lane or namespace>` and uploads them even when tests fail. The filters pin the assembly segment, so process recovery tests registered by the functional host run only in the process crash recovery shard.
163163

164164
The manifest balances whole test classes across thirteen descriptive groups and twenty-five lanes using original Linux case durations. CI expands each lane into its own isolated job; lane filters, arguments and result directories retain their original identities. Additional jobs can wait for runner capacity. Actual wall time requires a complete Linux run of this partition.
165165

0 commit comments

Comments
 (0)