Skip to content

ci: test on the latest stable Go alongside go.mod's minimum - #404

Merged
osanderson merged 1 commit into
mainfrom
ci/test-latest-go
Sep 27, 2026
Merged

osanderson merged 1 commit into
mainfrom
ci/test-latest-go

Conversation

@osanderson

Copy link
Copy Markdown
Collaborator

Summary

Every CI job installs exactly go.mod's minimum Go version (currently 1.26.6) via go-version-file. So nothing builds or tests this module on the newest Go release (currently 1.27.1), the one most consumers are on. govulncheck already scans under the latest Go, but it doesn't run tests.

  • Adds a test-latest-go job: go vet ./... and go test -race ./... on setup-go's stable with check-latest.
  • GOTOOLCHAIN=local stops the go command from switching toolchains, so the version under test is exactly the one installed. The job logs go version.
  • The existing test, lint, conformance and fuzz jobs stay on the minimum, which keeps that minimum honest. Coverage and SonarQube aren't duplicated.

No change to go.mod: Go 1.26.7 and 1.26.8 are bug-fix-only releases, and govulncheck under 1.26.6 is clean. Raising the minimum would force consumers up with no security reason.

Suggested follow-up: leave the new check non-required for a few runs, then add it to branch protection's required checks.

Testing

go vet ./... and go test -race ./... under Go 1.27.1 with GOTOOLCHAIN=local pass locally. The workflow YAML parses.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GMAyPYDPGpfnwow3JLeooZ

Every CI job installed exactly go.mod's minimum Go version, so nothing
built or tested this module on the newest Go release, the one most
consumers use. A new test-latest-go job runs go vet and the
race-enabled test suite on the latest stable Go, with GOTOOLCHAIN=local
so the version under test is the one installed. The existing jobs stay
on the minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@osanderson
osanderson merged commit 4614b83 into main Sep 27, 2026
10 checks passed
@osanderson
osanderson deleted the ci/test-latest-go branch September 27, 2026 15:46
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