name: Golangci-lint on: push: branches: - master pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: golangci: strategy: fail-fast: false matrix: include: - {os: macos-latest, CGO_ENABLED: "0", GOOS: darwin, GOARCH: amd64} - {os: macos-latest, CGO_ENABLED: "1", GOOS: darwin, GOARCH: amd64} - {os: macos-latest, CGO_ENABLED: "0", GOOS: darwin, GOARCH: arm64} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: aix, GOARCH: ppc64} # - {os: ubuntu-latest, CGO_ENABLED: "1", GOOS: aix, GOARCH: ppc64} # FIXME - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: dragonfly, GOARCH: amd64} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: freebsd, GOARCH: amd64} # - {os: ubuntu-latest, CGO_ENABLED: "1", GOOS: freebsd, GOARCH: amd64} # FIXME - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: freebsd, GOARCH: 386} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: freebsd, GOARCH: arm} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: 386} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: amd64} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: arm64} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: arm} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: loong64} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: mips64} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: mips64le} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: mips} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: mipsle} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: ppc64le} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: ppc64} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: riscv64} # - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: linux, GOARCH: s390x} # FIXME - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: netbsd, GOARCH: amd64} - {os: ubuntu-latest, CGO_ENABLED: "1", GOOS: netbsd, GOARCH: amd64} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: openbsd, GOARCH: 386} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: openbsd, GOARCH: amd64} # - {os: ubuntu-latest, CGO_ENABLED: "1", GOOS: openbsd, GOARCH: amd64} # FIXME - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: plan9, GOARCH: amd64} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: plan9, GOARCH: 386} - {os: ubuntu-latest, CGO_ENABLED: "0", GOOS: solaris, GOARCH: amd64} - {os: windows-latest, CGO_ENABLED: "0", GOOS: windows, GOARCH: amd64} - {os: windows-latest, CGO_ENABLED: "0", GOOS: windows, GOARCH: 386} permissions: contents: read # for actions/checkout to fetch code pull-requests: read # for golangci/golangci-lint-action to fetch pull requests name: lint runs-on: ${{ matrix.os }} env: CGO_ENABLED: "${{ matrix.CGO_ENABLED }}" GOARCH: ${{ matrix.GOARCH }} GOOS: ${{ matrix.GOOS }} steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version-file: go.mod - name: Setup golangci-lint uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: args: --verbose # Pinned, like the SHA-pinned actions above. With `latest`, a # golangci-lint release turns every open PR red at once, on code # nobody touched, and the breakage lands on whoever pushes next. # dependabot does not track this input, so bump it deliberately # and take the new findings in that same PR. version: v2.13.1