ci: add GitHub Actions workflow with golangci-lint - #1
Open
AskAlexSharov wants to merge 1 commit into
Open
Conversation
Adds CI that runs on push to main and on pull requests: - test job: build, vet, and `go test -race` on Go 1.21 (go.mod minimum) and 1.26 (latest). CGO_ENABLED is pinned to 1 since the libdeflate C sources are compiled at build time and need a C toolchain (present on ubuntu-latest). - lint job: golangci-lint v2.12.2 via golangci-lint-action@v9, on Go 1.26. The .golangci.yml (v2 schema) uses the standard linter set (errcheck, govet, ineffassign, staticcheck, unused) plus misspell, unconvert, revive, bodyclose and nilerr, with gofmt/goimports as formatters. Verified with `golangci-lint config verify` and green against the current tree.
AskAlexSharov
force-pushed
the
ci/add-golangci-lint
branch
from
July 24, 2026 02:19
f69bd5c to
682bb37
Compare
sudeepdino008
approved these changes
Jul 24, 2026
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.
What
Adds continuous integration for the module. There was no CI before this PR.
Two jobs, triggered on push to
mainand on every pull request:testgo build,go vet, andgo test -race -count=1go.modminimum) and 1.26 (latest)CGO_ENABLED=1is set explicitly — this is a cgo package (the bundled libdeflate C sources are compiled at build time), so every step needs a C toolchain.ubuntu-latestships gcc.lintgolangci-lintv2.12.2 viagolangci/golangci-lint-action@v9, on Go 1.26.Lint config (
.golangci.yml, v2 schema)Uses the
standardlinter set (errcheck,govet,ineffassign,staticcheck,unused) plusmisspell,unconvert,revive,bodyclose,nilerr, withgofmt/goimportsas formatters.Validated locally with golangci-lint v2.12.2 —
config verifypasses andrunreports 0 issues against the current tree, so CI is green from the first run. The vendoredlibdeflate/C directory contains no Go and is excluded defensively.Notes