ci: build, vet and test on every push and PR - #4
Merged
Merged
Conversation
The repo had no CI beyond the skill-bundle release job, so nothing checked that master builds. Add a workflow that runs gofmt, go vet, go test -race, and then cross-compiles for linux/amd64, linux/arm64 and both darwin targets - the expert container image cross-compiles this binary for the two linux ones, so a platform break should fail here rather than in an image build. A smoke test runs the freshly built binary. Four files were already unformatted (the gate cannot start red), so they are gofmt'd in the same commit; _legacy/ is excluded from the check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DZbMALUG7sRRxAx7A4Ffri
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.
There is no CI here beyond the skill-bundle release job, so nothing verifies that master builds.
The workflow
gofmt(excluding_legacy/),go vet ./...,go test ./... -racelinux/amd64,linux/arm64,darwin/arm64,darwin/amd64— the Altinity expert container image cross-compiles this binary for the two linux targets, so a platform-specific break should fail here rather than in an image build--help,version)concurrencygroup so superseded runs cancelThe gofmt commit
Four files were already unformatted on master (
cmd/root.go,pkg/api/oauth.go,pkg/config/config.go,internal/skillbundle/install_test.go) — a gate that starts red is a gate everyone learns to ignore, so they are gofmt'd here. The changes are mechanical: var-block alignment and a doc-comment reflow._legacy/is left alone and excluded from the check.Verified locally:
gofmt -lclean outside_legacy/,go vetclean,go test ./... -racepasses, all four cross-builds succeed.