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} # FIXME - {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} - {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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup go uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version-file: go.mod - name: Setup golangci-lint uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1 with: args: --verbose version: latest