Skip to content

feat: let run-tiered-tests.yml locate a test project outside a same-named folder - #84

Merged
NickGraham101 merged 1 commit into
mainfrom
SupportNonNestedTestProjectLayout
Aug 22, 2026
Merged

NickGraham101 merged 1 commit into
mainfrom
SupportNonNestedTestProjectLayout

Conversation

@NickGraham101

Copy link
Copy Markdown
Owner

Summary

  • Adds an optional TestProjectRelativePath parameter to AzureDevOpsTemplates/Deploy/JobTemplates/run-tiered-tests.yml, used only to locate the extracted test project's folder (and its .runsettings) under $(Build.SourcesDirectory)/src/. TestProject itself keeps naming the .csproj, test run title, and coverage/results artifact names exactly as before.
  • Defaults to TestProject (coalesced), matching today's only behaviour, so existing callers are unaffected - grahamandtonic's test projects already live directly under a same-named folder.

Why

Needed for gandt-media's upcoming IntegrationTests stage (part of the CI/CD refactor bringing grahamandtonic's tiered-test pattern to gandt-media). Its integration test project lives at tests/gandt.media.console.tests.integration/ with a ProjectReference to ../../src/gandt.media.console/ - a source-level reference, not just a build-output dependency, so MSBuild needs the real referenced project source at that resolved relative path when dotnet test runs. grahamandtonic's repo nests its whole solution under one src/ tree, so run-tiered-tests.yml has always assumed the extracted test project sits directly under a folder named after itself. gandt-media's tests/ + src/ sibling layout doesn't fit that assumption - no combination of the existing parameters could satisfy both the extraction folder-naming requirement and get the referenced src/gandt.media.console source positioned correctly relative to it.

Test plan

  • Confirm grahamandtonic's existing calls (unaffected - no TestProjectRelativePath passed) still compile/resolve correctly via the Pipeline Preview API before this merges
  • gandt-media's consumer PR (separate, in gandt-media) exercises this end-to-end against a real build

🤖 Generated with Claude Code

https://claude.ai/code/session_01BGTTFHK6yRh4Frxayi5KVs

…amed folder

Adds an optional TestProjectRelativePath parameter, used only to locate the
extracted test project's folder under $(Build.SourcesDirectory)/src/ (and its
.runsettings) - TestProject itself keeps naming the .csproj, test run title, and
coverage/results artifact names exactly as before. Defaults to TestProject, so
existing callers (grahamandtonic, whose test projects already live directly under
a same-named folder) are unaffected.

Needed for a consumer whose test project has a ProjectReference reaching into a
differently-rooted sibling folder (tests/X referencing ../../src/Y, rather than
everything nesting under one src/ tree) - the archive has to preserve the repo's
real top-level layout for that reference to resolve, so the extracted test
project no longer sits directly under a folder matching its own name.
@github-actions

Copy link
Copy Markdown

Unit Test Results

1 129 tests  ±0   1 129 ✔️ ±0   33s ⏱️ +5s
       2 suites ±0          0 💤 ±0 
       1 files   ±0          0 ❌ ±0 

Results for commit 4634da3. ± Comparison against base commit 286c188.

@NickGraham101
NickGraham101 merged commit 8262cad into main Aug 22, 2026
4 checks passed
@NickGraham101
NickGraham101 deleted the SupportNonNestedTestProjectLayout branch August 22, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant