Repository navigation
ci: add a test workflow and build the command tree once - #111
Merged
Merged
Conversation
leandroh
approved these changes
Nov 25, 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.
Summary
.github/workflows/test.yml:go build,go vetandgo teston every pull request and on pushes tomain, with the Go version taken fromgo.mod. Until now nothing ran the test suite on PRs.cmd.Root(), which builds the command tree once and returns it without running anything.Executeuses it, and so do the in-process command tests (testRootdrops its ownsync.Once). The tree registers flags on the package-levelrootCmd, so building it twice would panic.Known limitations
ubuntu-latestonly; the install/update tests per OS are tracked separately (LSH-3486).Testing
Clone & checkout
git clone https://github.com/latitudesh/cli.git lsh-cli cd lsh-cli git checkout LSH-3445-ci-and-rootBuild & unit tests
Try the commands
No login needed: these only build the command tree. The global
--dry-runand--debugflags should be listed once, and the project-scoped groups wired after the generated commands should still be there:The workflow itself runs on this PR: the
Testcheck should be green.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Adds Linux checks for pull requests and pushes to
main.mainrun Go build, vet, and test checks.No actionable issues found. LanusseMorais explicitly deferred tests on other operating systems to LSH-3486. Build and tests were not run during this review.
Reviews (1) · Last reviewed commit: "refactor(cmd): build the command tree on..." · Reviewed by Greptile