Skip to content

ci: bump actions, move golangci-lint to lint.yml - #1329

Merged
thaJeztah merged 4 commits into
opencontainers:mainfrom
kolyshkin:golangci-lint-yml
Oct 14, 2026
Merged

thaJeztah merged 4 commits into
opencontainers:mainfrom
kolyshkin:golangci-lint-yml

Conversation

@kolyshkin

@kolyshkin kolyshkin commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor
  1. Bump actions/checkout and actions/setup-go to v7. This gets rid of
    the "Node.js 20 is deprecated" warnings. Since setup-go v6 sets
    GOTOOLCHAIN=local itself, drop it from build.yml.

  2. Makefile: remove test, .govet, and unused variables. The test
    target depends on .golint, which was removed in 2023, so make test
    is broken; it is not used by CI either. .govet is redundant, since
    golangci-lint's govet linter runs all the go vet analyzers (and
    also checks schema/validate).

  3. Makefile: add lint target, which runs golangci-lint for both the
    main module and schema/validate.

  4. Move golangci-lint from build.yml (where it runs for every Go version
    in the matrix) to a single job in lint.yml, which runs make lint.
    The Go version is pinned to 1.27, which golangci-lint v2.14 is built
    with; the two should be bumped together.

This also gets rid of the "Node.js 20 is deprecated" warnings.

Since v6, actions/setup-go sets GOTOOLCHAIN=local for all subsequent
steps, so we no longer need to set it explicitly.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
The "test" target depends on .golint, which was removed by commit
15d2a5a ("Switch Go linting to use golangci-lint"), so "make test"
fails with:

	make: *** No rule to make target '.golint', needed by 'test'.  Stop.

Since CI does not use it, and it makes little sense locally, remove it.

The .govet target is redundant, since golangci-lint's govet linter runs
all the "go vet" analyzers (and also checks schema/validate, which
.govet does not). Remove it, and its use from CI.

Remove HOST_GOLANG_VERSION and ALLOWED_GO_VERSION variables, which were
only used by the (removed) .golint target.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Add a "lint" target which runs golangci-lint for both the main module
and schema/validate.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Running golangci-lint for every Go version in the build matrix is
redundant, as the results are the same. Move it to a separate job in
lint.yml, so it runs once.

Pin the Go version to the one golangci-lint v2.14 is built with
(1.27), rather than using "stable", so that a new Go release does not
unexpectedly break the linter; bump both versions together.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Comment thread .github/workflows/build.yml
@AkihiroSuda AkihiroSuda added this to the v1.3.1 milestone Oct 14, 2026

@thaJeztah thaJeztah 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

@thaJeztah
thaJeztah merged commit b6f46de into opencontainers:main Oct 14, 2026
7 checks passed
@thaJeztah

Copy link
Copy Markdown
Member

Nice one GitHub, nice; schrödingers state;

Screenshot 2026-10-14 at 03 18 27

@kolyshkin
kolyshkin deleted the golangci-lint-yml branch October 14, 2026 20:33
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.

3 participants