diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16646ce..7bec5c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [1.18.x, 1.21.x] + go-version: [1.18.x, 1.23.x] steps: - name: Setup Go uses: actions/setup-go@v5 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index cd74297..a602c30 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,9 +1,15 @@ name: golangci-lint + on: push: branches: - - master + - '**' pull_request: + branches: + - master + +permissions: + contents: read jobs: golangci: @@ -13,5 +19,16 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + - name: Get go version from go.mod + run: | + echo "GO_VERSION=$(grep '^go ' go.mod | cut -d " " -f 2)" >> $GITHUB_ENV + + - name: Setup-go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.61.0 diff --git a/.golangci.yml b/.golangci.yml index 22c53d0..d4b92e8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,7 +6,6 @@ linters: enable: - dupl - errcheck - - exportloopref - funlen - gci - goconst @@ -14,15 +13,19 @@ linters: - gocyclo - gofmt - goimports + - gosec - gosimple - govet - ineffassign - lll - misspell + - nolintlint - prealloc - revive - staticcheck - stylecheck + - thelper + - tparallel - typecheck - unconvert - unparam @@ -32,6 +35,9 @@ linters-settings: gocritic: disabled-checks: - exitAfterDefer + thelper: + test: + begin: false issues: exclude-rules: