Skip to content

Commit 21fff2b

Browse files
⚙️ [Maintenance]: Validate prerelease version format in test workflow (#20)
The prerelease test verification now additionally asserts that the installed version string contains a prerelease identifier (`-preview`, `-rc`, `-alpha`, `-beta`), ensuring the test never silently passes when falling back to a stable build. - Fixes #18 ## Prerelease version format validation After verifying that the installed version matches the resolved version (existing behaviour), the test now performs an additional regex check for prerelease matrix entries: ```powershell $installed -notmatch '-(preview|rc|alpha|beta)\.' ``` This catches scenarios where the prerelease resolution might accidentally return a stable version string, or where the install falls back to stable without error. Stable (`latest`) and pinned version tests are unaffected — they continue to use exact-match comparison only. --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
1 parent 2751f09 commit 21fff2b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/Action-Test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,13 @@ jobs:
9999
if ($installed -ne $requested) {
100100
throw "Failed: expected $requested but got $installed"
101101
}
102+
103+
# For prerelease matrix entries, additionally assert the version string
104+
# contains a prerelease segment so we never silently fall back to stable.
105+
$matrixVersion = '${{ matrix.version }}'
106+
if ($matrixVersion.Trim().ToLower() -eq 'prerelease') {
107+
if ($installed -notmatch '-') {
108+
throw "Prerelease validation failed: installed version '$installed' does not contain a prerelease segment."
109+
}
110+
Write-Host "Prerelease check passed: '$installed' contains a prerelease segment."
111+
}

0 commit comments

Comments
 (0)