Discover test projects in build pipelines#1693
Conversation
Replace duplicated hardcoded test project lists with framework-aware discovery shared by the primary and net48 coverage workflows.
ReviewThis is a build-tooling-only change ( What it does well
Minor nits (non-blocking)
Test coverage: Reasonable for a CI script change — author validated manually (discovery returns all 4 projects for both TFMs, PS 7/5.1, full net10 run, partial net48 run) per the PR description. No automated test for Overall: solid, well-scoped DRY fix for the exact problem it says it's solving. No blocking issues found. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1693 +/- ##
=======================================
- Coverage 96% 96% -1%
=======================================
Files 455 457 +2
Lines 29540 30150 +610
=======================================
+ Hits 28502 29086 +584
- Misses 1038 1064 +26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
*.Tests.csprojfiles instead of maintaining test project arrays.TargetFrameworks/TargetFrameworkwith MSBuild and select only projects supporting the requested runtime.Motivation
PR #1692 added isolated test projects and exposed two independent hardcoded lists that could drift: first the net48 workflow omitted the projects, then the primary coverage pipeline did. Test discovery is an independent build-pipeline improvement and ensures future test projects are included automatically when they follow the existing naming convention and declare the target framework.
Validation
build.bat.dotnet build UnitsNet.slnx --configuration Release --no-restoreStart-Tests -SkipCoverage: 46,441 passed, 20 skipped across all four net10.0 test projects.