Repository navigation
ci(packaging): install-test the Chocolatey package on a throwaway runner - #46
Merged
Merged
Conversation
There is no local sandbox for the pre-push install test, so a fresh windows-latest runner (choco preinstalled, admin) stands in for one. scripts/verify-chocolatey.ps1 installs the locally packed package and checks the install path, the Add/Remove Programs entry, the .lts/.ltw associations and the sidecar. It then reinstalls over a running app, uninstalls (recording whether the NSIS uninstaller detaches), runs choco uninstall after a manual uninstall, and confirms a tampered checksum aborts. The install path is also the "Settings shows the normal update controls" check: app_update.rs's nsis_install_is_not_managed pins exactly that path as unmanaged. verify-chocolatey.yml runs it on packaging PRs, on dispatch, and as the chocolatey-verify job that publish-packages' push now depends on. No API key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rors Get-UninstallRegistryKey returns $null when no key matches, and @($null) is a one-element array, so the "nothing to uninstall" guard never fired. The loop then passed an empty path to Uninstall-ChocolateyPackage, which threw GetFullPath "The path is not of a legal form". This hit anyone who removed LogTapper from Settings > Apps before running choco uninstall. Caught by verify-chocolatey step 4 on its first CI run. Also makes the tamper step independent of the earlier ones (--force), since a failed uninstall left logtapper listed as installed and choco answered "already installed" without reaching the checksum. It now also asserts the failure mentions the checksum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
There's no local sandbox for the pre-push install test of the Chocolatey package, so this uses a fresh
windows-latestrunner as the sandbox: a throwaway VM withchocopreinstalled and admin rights. This PR's own CI run is that test, against v0.13.3.scripts/verify-chocolatey.ps1runs five checks. Every check runs even after an earlier one fails; the script prints the full list of failures at the end:C:\Program Files\LogTapper\log-tapper.exewithlogtapper-mcp.exebeside it; Add/Remove Programs showsLogTapperwith publisherJeff Picklykand the right version;.ltsand.ltware registered.--force: exit 0, and the installer closes the app instead of stopping on it. If a headless runner won't keep the GUI running, the log says so as a warning rather than silently passing.chocoreturned, which settles whether the NSIS uninstaller runs detached (the plan's open_?=question).choco uninstallexits 0 through the script's "nothing to uninstall" path.nsis_install_is_not_managedinsrc-tauri/src/commands/app_update.rspins exactlyC:/Program Files/LogTapper/log-tapper.exeas not package-managed, so check 1's install path covers it..github/workflows/verify-chocolatey.ymlruns the script:workflow_dispatch(defaults to the latest release);workflow_call.It renders with dummy DMG hashes (only the NSIS hash matters here), packs, tests, and uploads the tested
.nupkg. There's a 30-minute timeout in case an installer dialog hangs, and it needs no secrets.publish-packages.yml: a newchocolatey-verifyjob calls that workflow for the version being released, and thechocolateypush job now depends on it. A package that doesn't install, reinstall and uninstall cleanly never reaches moderation.Test plan
chocolateyuninstall.ps1, parses with the pwsh 7.6 AST parser (10 files, 0 errors)checksum64changes, for both a leading0and a leading letter; the rest of the file is identicalVerify Chocolatey packagerun passes against v0.13.3. That run is the sandbox test for the first push.gh workflow run publish-packages.yml -f version=0.13.3pushes the first version, withchocolatey-verifyrunning before it🤖 Generated with Claude Code