diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml new file mode 100644 index 000000000..b162434fe --- /dev/null +++ b/.github/workflows/golangci-lint.yaml @@ -0,0 +1,30 @@ +name: golangci-lint +on: + push: + branches: + - master + - release-0.31 + pull_request: + +permissions: + contents: read + +env: + GO_VERSION: v1.22 + GOLANGCI_LINT_VERSION: v1.56 + +jobs: + golangci: + name: lint + runs-on: ubuntu-20.04 + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: ${{ env.GOLANGCI_LINT_VERSION }} + args: --verbose --timeout=5m diff --git a/.golangci.yaml b/.golangci.yaml index 8311ea5df..4e6eb506d 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,5 +1,5 @@ run: - timeout: 3m + timeout: 5m skip-dirs: - vendor linters: diff --git a/Makefile b/Makefile index 222457b93..721af6e3f 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ endif GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) INSTALL_LOCATION:=$(shell go env GOPATH)/bin -GOLANGCI_LINT_VERSION ?= 1.54.0 +GOLANGCI_LINT_VERSION ?= 1.56.2 GOSEC_VERSION ?= 2.13.1 REGISTRY ?= gcr.io/$(shell gcloud config get-value project)