Add CI pipeline (GitHub Actions) - #2
Merged
Merged
Conversation
Removes trailing whitespace so the codebase passes the gofmt check enforced by the new CI workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Run gofmt, go vet, go test -race -cover, golangci-lint, and govulncheck on every push and PR, plus a linux/darwin amd64+arm64 cross-compile matrix. Enable the linters required by CONVENTIONS.md and tick the roadmap item. Co-Authored-By: Claude Opus 4.8 <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.
Why
The repo had no automated checks — formatting, tests, linting, and
vulnerability scanning were all manual. CONVENTIONS.md already specifies the
tooling that "should be enforced in CI, not by humans," and a CI pipeline is the
top item in Phase 4 of ROADMAP.md. This wires that up.
What
Adds
.github/workflows/ci.yml, which runs on every push tomainand on everypull request:
gofmt -sformatting check,go vet, andgo test -race -cover ./...golangci-lint(pinnedv1.62.2), configured via.golangci.ymlto enable the linters CONVENTIONS.md requires:
errcheck,govet,staticcheck,revive,gosecgovulncheck ./...to dogfood the project's own goallinux/darwin×amd64/arm64The Go version is read from
go.mod(go-version-file) so CI never drifts fromthe toolchain. Runs are deduplicated per-ref via a
concurrencygroup, and theworkflow has read-only
contentspermission.Also in this PR
gofmt -sfix forinternal/extractor/extractor.go— it had trailingwhitespace and would have failed the new formatting gate on the first run.
Testing
All jobs were reproduced locally against the current
main:gofmt -s -l .clean,go vet ./...cleango test -race -cover ./...passes (matcher coverage ~92%)Note
The lint job pins
golangci-linttov1.62.2for a stable config schema. If arunner ever rejects that version, it's a one-line bump in
ci.yml.