ci: modernize the Go workflow (module-mode matrix + module verify)#11
Merged
Conversation
The existing matrix runs in GOPATH mode across pre-module Go versions (1.5+), so it never checks the module lockfile. This adds a separate job on modern Go that fails if the committed go.sum is incomplete (git diff --exit-code after go mod download) and confirms cached modules match their checksums (go mod verify). Guards the class of breakage seen in oasdiff/yaml: a go.mod pinned to a release tag while go.sum held only a pseudo-version -- a clean -mod=readonly build fails, but CI that runs go mod download/go get first repairs the workspace go.sum and stays green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…go v6) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
reuvenharrison
added a commit
that referenced
this pull request
Jun 24, 2026
* ci: replace the inherited GOPATH matrix with a module-mode matrix The Test job was inherited verbatim from upstream go-yaml/yaml.v3: Go 1.5..tip in GOPATH mode. This fork's go.mod requires go 1.22.5 and the code uses range-over-int / any, so those versions can't build it -- the matrix was failing/meaningless. Replace it with a module-mode matrix on the supported range (1.22.x floor, 1.23.x, latest stable), drop the GOPATH layout and the tip-build hack, and bump actions/checkout + setup-go. The Verify modules job (added in #11) is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci: align Go support with oasdiff/yaml (go 1.25, test on stable) oasdiff/yaml declares go 1.25 and tests on the latest stable. Match it here: bump the go directive 1.22.5 -> 1.25 and replace the inherited GOPATH matrix (Go 1.5..tip, which can't build this fork) with a single module-mode job on stable. All consumers are >= 1.25 (kin-openapi 1.25; oasdiff/oasdiff-service 1.26), so the floor bump forces no one up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- 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.
Modernizes yaml3's CI, which was inherited verbatim from upstream go-yaml/yaml.v3.
Test job
The matrix tested Go 1.5 .. tip in GOPATH mode. This fork's go.mod requires go 1.22.5 and the code uses range-over-int /
any, so those versions can't build it — the matrix was failing/meaningless. Replaced with a module-mode matrix on the supported range (1.22.xfloor,1.23.x, lateststable), dropping the GOPATH layout and the tip-build hack. Bumpedactions/checkout→v7,setup-go→v6.Verify-modules job (new)
Fails if the committed
go.sumis incomplete (git diff --exit-codeaftergo mod download) and confirms cached modules match their checksums (go mod verify) — guards the class of breakage seen in oasdiff/yaml (go.mod pinned to a tag while go.sum held only a pseudo-version).