ci: update golangci-lint to v1.56.1 and golangci-lint action to v4 (#4326)

This commit is contained in:
Marten Seemann 2024-02-11 08:46:27 +07:00 committed by GitHub
parent 284996e13c
commit 0a7823c991
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,6 +39,8 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
go: [ "1.21.x", "1.22.x" ] go: [ "1.21.x", "1.22.x" ]
env:
GOLANGCI_LINT_VERSION: v1.56.1
name: golangci-lint (Go ${{ matrix.go }}) name: golangci-lint (Go ${{ matrix.go }})
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -46,44 +48,44 @@ jobs:
with: with:
go-version: ${{ matrix.go }} go-version: ${{ matrix.go }}
- name: golangci-lint (Linux) - name: golangci-lint (Linux)
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v4
with: with:
skip-pkg-cache: true skip-pkg-cache: true
args: --timeout=3m args: --timeout=3m
version: v1.55.2 version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: golangci-lint (Windows) - name: golangci-lint (Windows)
if: success() || failure() # run this step even if the previous one failed if: success() || failure() # run this step even if the previous one failed
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v4
env: env:
GOOS: "windows" GOOS: "windows"
with: with:
skip-pkg-cache: true skip-pkg-cache: true
args: --timeout=3m args: --timeout=3m
version: v1.55.2 version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: golangci-lint (OSX) - name: golangci-lint (OSX)
if: success() || failure() # run this step even if the previous one failed if: success() || failure() # run this step even if the previous one failed
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v4
env: env:
GOOS: "darwin" GOOS: "darwin"
with: with:
skip-pkg-cache: true skip-pkg-cache: true
args: --timeout=3m args: --timeout=3m
version: v1.55.2 version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: golangci-lint (FreeBSD) - name: golangci-lint (FreeBSD)
if: success() || failure() # run this step even if the previous one failed if: success() || failure() # run this step even if the previous one failed
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v4
env: env:
GOOS: "freebsd" GOOS: "freebsd"
with: with:
skip-pkg-cache: true skip-pkg-cache: true
args: --timeout=3m args: --timeout=3m
version: v1.55.2 version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: golangci-lint (others) - name: golangci-lint (others)
if: success() || failure() # run this step even if the previous one failed if: success() || failure() # run this step even if the previous one failed
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v4
env: env:
GOOS: "solaris" # some OS that we don't have any build tags for GOOS: "solaris" # some OS that we don't have any build tags for
with: with:
skip-pkg-cache: true skip-pkg-cache: true
args: --timeout=3m args: --timeout=3m
version: v1.55.2 version: ${{ env.GOLANGCI_LINT_VERSION }}