From 5824686b0a55f7c67e4f8aaecaa022a785e40a79 Mon Sep 17 00:00:00 2001 From: David Hill Date: Thu, 16 May 2024 10:31:11 -0400 Subject: [PATCH] build: Test against Go 1.22 --- .github/workflows/go.yml | 10 +++++----- .golangci.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c876aad..4cdcccd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -9,19 +9,19 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: ["1.20", "1.21"] + go: ["1.21", "1.22"] steps: - name: Set up Go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #4.1.0 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 #v5.0.1 with: go-version: ${{ matrix.go }} - name: Check out source - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b #v4.1.4 - name: Install linters - run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2" + run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.58.1" - name: Build run: go build ./... - name: Lint - run: golangci-lint run --disable-all --deadline=10m --enable=gofmt --enable=govet --enable=gosimple --enable=unconvert --enable=ineffassign + run: golangci-lint run - name: Test run: go test -v ./... diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..0d8bba0 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,26 @@ +run: + deadline: 10m + +linters: + disable-all: true + enable: + - asciicheck + - bidichk + - bodyclose + - durationcheck + - errchkjson + - exportloopref + - gofmt + - goimports + - gosimple + - govet + - grouper + - ineffassign + - misspell + - nosprintfhostport + - reassign + - rowserrcheck + - tparallel + - typecheck + - unconvert + - unused