Repository navigation
fix(ci-unit-tests): report on what the check actually examined - #45
Merged
Merged
Conversation
…, pin the test SDK to 10.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues addressed by this PR
Closes #44
Makes
ci-unit-testsreport on what it actually examined.Projects are now discovered by being test projects, recursively under
.ci/unit-tests, instead of by reading one solution and matching a filename pattern. That reaches eight test projects across seven repositories that the old selector either skipped to a green or rejected outright for their naming, and loses none.The zero-output guard is replaced. It compared
.trxfile counts, anddotnet testwrites a results file unconditionally, so it never fired. Verdicts now come from the TRX counters, withdotnet test --list-testsrun first to separate a project that holds no test from one whose tests were all excluded. A project with no test, a project in which nothing ran, a results file without counters, and a listing that cannot be read are each a distinct error.Tests needing software a hosted runner cannot have are excluded with
--filter "TestCategory!=RequiresExternalSoftware", and the number excluded is reported per project rather than passing silently. Tests the runner declined to execute are listed as a warning when some others ran, and fail the project when none did.Build is a separate step so a compile failure is reported as one. The SDK for the caller's test build is pinned through a generated
global.json, defaulting to 10.0 withrollForward: latestFeatureso it cannot cross a major; a repository supplying its ownglobal.jsonis left alone. The dependency build stays on 8.0.The template's job is renamed
ci-unit-tests, matching the tier bundles. It wasunit-tests, which is the check-run name BHoMBot produces.Test files
Not applicable. Exercised against purpose-built probe projects covering the empty, singular-named, nested-solution, no-solution, all-excluded, inconclusive, ignored, parameterised, unreadable-listing, failing-test and failing-build cases, on four target frameworks.
Changelog
ci-unit-testsdiscovers test projects recursively under.ci/unit-testsby project content rather than by solution membership or filenameci-unit-testsfails a project that contains no test, or in which no test ran, instead of reporting successci-unit-testsexcludes tests categorisedRequiresExternalSoftwareand reports the count per projectci-unit-testspins the SDK used to build the caller's testsci-unit-testsproxy template's job is renamed fromunit-teststoci-unit-testsAdditional comments
The input
dotnet_versionis split intodeps_dotnet_versionandtest_dotnet_version. That is a breaking rename, and safe only because nothing installs this action yet: a composite action ignores an unknownwith:key rather than failing, so a caller passing the old name would silently get defaults.Two repositories need their external-software tests tagged before this is installed on them, or the check will red on work that is fine:
Robot_ToolkitandRFEM6_Toolkit. Neither is reached by the current selector, so neither has ever had a result.Measured, not derived: every claim above about discovery, verdicts and the SDK comes from runs of this branch against the probe set, each paired with a control run of the published action on the same tree.
Karamba3D_Toolkitremains unbuildable underdotnet testfor a reason outside this change, which the issue does not claim to fix.