Skip to content

ci: modernize the Go workflow (module-mode matrix + module verify)#11

Merged
reuvenharrison merged 2 commits into
v3from
ci-verify-modules
Jun 24, 2026
Merged

ci: modernize the Go workflow (module-mode matrix + module verify)#11
reuvenharrison merged 2 commits into
v3from
ci-verify-modules

Conversation

@reuvenharrison

@reuvenharrison reuvenharrison commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

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.x floor, 1.23.x, latest stable), dropping the GOPATH layout and the tip-build hack. Bumped actions/checkout→v7, setup-go→v6.

Verify-modules job (new)

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 (go.mod pinned to a tag while go.sum held only a pseudo-version).

reuvenharrison and others added 2 commits June 24, 2026 22:53
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 reuvenharrison merged commit 45f2041 into v3 Jun 24, 2026
2 of 28 checks passed
@reuvenharrison reuvenharrison changed the title ci: add a modern-Go job to verify go.mod/go.sum ci: modernize the Go workflow (module-mode matrix + module verify) Jun 24, 2026
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>
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