Skip to content

ci: test against module, oldstable, and stable Go versions, update golangci-lint go v2.12, update minimum go to v1.21 - #20

Merged
dmcgowan merged 4 commits into
containerd:mainfrom
thaJeztah:ci_matrix
Aug 13, 2026
Merged

ci: test against module, oldstable, and stable Go versions, update golangci-lint go v2.12, update minimum go to v1.21#20
dmcgowan merged 4 commits into
containerd:mainfrom
thaJeztah:ci_matrix

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

No description provided.

@thaJeztah

Copy link
Copy Markdown
Member Author

OK; looks like it's broken;

go test -v -race
go: downloading github.com/sirupsen/logrus v1.9.4
go: downloading golang.org/x/sys v0.13.0
Error: context.go:43:2: package log/slog is not in GOROOT (/opt/hostedtoolcache/go/1.20.14/x64/src/log/slog)
Error: Process completed with exit code 1.

commit 07c1312 added use of log/slog,
which requires go1.21.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah changed the title ci: test against module, oldstable, and stable Go versions, update golangci-lint go v2.12 ci: test against module, oldstable, and stable Go versions, update golangci-lint go v2.12, update minimum go to v1.21 Aug 12, 2026
@thaJeztah
thaJeztah requested a lite review from Copilot August 12, 2026 22:17
@thaJeztah

Copy link
Copy Markdown
Member Author

And borked on windows due to line-endings;

  Error: context.go:1:1: File is not properly formatted (gofmt)
  /*
  ^
  Error: slog.go:1:1: File is not properly formatted (gofmt)
  /*
  ^
  2 issues:
  * gofmt: 2

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repository’s supported Go toolchain and CI configuration to align with newer Go versions and golangci-lint v2.

Changes:

  • Bump minimum Go version in go.mod from 1.20 to 1.21.
  • Update CI to test against go.mod, oldstable, and stable Go versions; set GOTOOLCHAIN=local.
  • Update golangci-lint in CI to v2.12 and expand linter job OS matrix (adds Windows).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
go.mod Raises module minimum Go version to 1.21.
go.sum Adds missing /go.mod checksum entries for existing deps.
.github/workflows/ci.yml Adjusts CI Go version strategy (stable/oldstable/go.mod), sets GOTOOLCHAIN=local, updates golangci-lint, expands linter OS matrix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci.yml
Avoid Windows checkouts converting files to CRLF, which causes
gofmt cheks to fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

Copy link
Copy Markdown
Member Author

@dmcgowan @austinvazquez @AkihiroSuda PTAL 🤗

@austinvazquez austinvazquez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread .github/workflows/ci.yml
strategy:
matrix:
go-version:
- "" # leave empty to use go-version-file (go.mod)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat trick. Might steal this from you. :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it does print a warning, but it works!

Still hoping they just add a go.mod (or something similar) option as magic value.

@dmcgowan
dmcgowan merged commit 1bfa580 into containerd:main Aug 13, 2026
7 checks passed
@thaJeztah
thaJeztah deleted the ci_matrix branch August 13, 2026 16:23
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.

4 participants