Skip to content

ci: run build, vet, and tests on main pushes and PRs - #2

Merged
exec-astraea merged 1 commit into
mainfrom
ci/test-workflow
Jul 25, 2026
Merged

ci: run build, vet, and tests on main pushes and PRs#2
exec-astraea merged 1 commit into
mainfrom
ci/test-workflow

Conversation

@exec-astraea

Copy link
Copy Markdown
Owner

Adds a Test workflow so every push to main and every pull request is gated on the code actually building and passing.

What runs

Step Command
Format gate gofmt -l . (fails on non-empty output)
Build go build ./...
Vet go vet ./...
Test go test -race ./...

Triggers: pushes to main, every pull request (no branch filter, so PRs from any branch are covered), plus workflow_dispatch for manual runs.

Notes

  • Go version comes from go.mod via go-version-file, so bumping the module bumps CI rather than leaving a pinned version to drift.
  • gofmt -l exits 0 whether or not files are misformatted, so the step checks for non-empty output explicitly instead of relying on the exit code.
  • -race needs cgo; ubuntu-latest has gcc with CGO_ENABLED=1 by default. This could not be verified locally (no gcc in the dev sandbox) — this PR is itself the first live run.
  • Sits alongside the existing docker-publish.yml, which is unchanged.

Both workflows are documented in a new CI section in AGENTS.md.

🤖 Generated with Claude Code

Adds a Test workflow alongside the existing image publish: gofmt gate,
go build, go vet, and go test -race. Triggers on pushes to main and on
every pull request, plus manual dispatch.

Go version comes from go.mod via go-version-file so CI tracks the module
rather than pinning a version that can silently drift.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@exec-astraea
exec-astraea merged commit cc67e60 into main Jul 25, 2026
1 check passed
@exec-astraea
exec-astraea deleted the ci/test-workflow branch July 25, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant