Say how the exit code behaves in the CI we actually build - #467
Open
nohwnd wants to merge 1 commit into
Open
Conversation
The test script page teaches that the exit code is the number of failures and proves it with pwsh -File. The GitHub Actions step on the next page runs pwsh -command, which normalizes any non-zero exit to 1, so the count does not survive into the pipeline the tutorial builds. The build still goes red, but we were explaining it with the wrong mechanism. Say that the coverage target is not a gate. Coming in under CoveragePercentTarget does not fail the run and does not change the exit code, and "the target you are being measured against" reads like a gate to anybody setting up a pipeline. Create the .gitignore. Three pages said the artifacts belong in it and none of them created it, while the checklist claimed both files were ignored. Following the tutorial literally committed testResults.xml and coverage.xml. Mention that Pester already writes GitHub annotations through Output.CIFormat before recommending an action that does something similar. Add culture to the cross-platform note. It is the bug Planetarium actually has, the report reads "Mercury 0,387 AU" on a machine with a comma decimal separator, and the suite stays green because the only asserted line has no decimal part. Fix #462
This was referenced Aug 29, 2026
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.
Fix #462
Stacked on #466. Review #464, #465, #466 first.
The exit code lesson did not survive into the workflow.
tutorial/7-ci/1-test-script.mdxteaches that the exit code is the number of failures and proves it withpwsh -File, which is true. The GitHub Actions step on the very next page runspwsh -command, and under-commandPowerShell normalizes any non-zero exit to 1:The build still goes red, so nothing was broken, but the page sold a property that does not reach the CI it builds two pages later.
The coverage target is not a gate. Missing it changes nothing:
"The target you are being measured against" reads like a gate to anybody wiring up a pipeline, so the page now says plainly that it is a number to compare against and points at the result object if you want to enforce it.
.gitignoreis now actually created. Three pages said the artifacts belong in it, none created it, and the checklist then claimed both files were ignored. Following the tutorial literally committedtestResults.xmlandcoverage.xml.Annotations.
Output.CIFormatdefaults toAutoand detects$GITHUB_ACTIONS, so failures already show up on the job:That now comes before the
dorny/test-reportersuggestion, which is still there for the case it genuinely helps with.Culture. The cross platform note listed path separators and case sensitivity. The bug Planetarium actually has is culture:
'{0,-8} {1} AU' -f ...formats with the current culture, so the report readsMercury 0,387 AUon my machine. The suite stays green because the only asserted line isEarth 1 AU, which has no decimal part. It seemed worth saying that out loud on the page whose point is that a matrix finds the bugs you cannot see locally.Verification
Measured all of it on pwsh 7.5.5 with Pester 6.1.0: exit codes for 0, 1 and 3 failures under both
-Fileand-command, a run withCoveragePercentTarget = 99, agit init && git add . && git commitfollowing the tutorial as written, and the annotation output withGITHUB_ACTIONS=true. Site builds.🤖