From eb145f80816e9748bd91195b5101f0b1f436df17 Mon Sep 17 00:00:00 2001 From: tdakkota Date: Mon, 23 Sep 2024 08:47:41 +0300 Subject: [PATCH 1/3] ci: use `stable`/`oldstable` versions of Go to test --- .github/workflows/cover.yml | 14 +++++++------- .github/workflows/e2e.yml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cover.yml b/.github/workflows/cover.yml index b08e2054..e5f167ba 100644 --- a/.github/workflows/cover.yml +++ b/.github/workflows/cover.yml @@ -1,12 +1,12 @@ name: cover on: -# TODO: setup codecov -# https://github.com/ClickHouse/ch-go/issues/137 -# push: -# branches: -# - main -# pull_request: + # TODO: setup codecov + # https://github.com/ClickHouse/ch-go/issues/137 + # push: + # branches: + # - main + # pull_request: workflow_dispatch: jobs: @@ -18,7 +18,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: oldstable - name: Get Go environment id: go-env diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a352b3c9..3f03487d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -14,8 +14,8 @@ jobs: fail-fast: true matrix: go: - - "1.20" - - "1.21" + - "oldstable" + - "stable" clickhouse: - v21.8.14.5-lts - v22.3.11.12-lts From 451756fef30f6386837e0047e7ebc8886744048f Mon Sep 17 00:00:00 2001 From: tdakkota Date: Mon, 23 Sep 2024 08:49:42 +0300 Subject: [PATCH 2/3] ci: add clickhouse `v24` to test matrix --- .github/workflows/e2e.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3f03487d..f895e209 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -24,6 +24,7 @@ jobs: - v23.3.8.21-lts - v23.8.7.24-lts - v23.10.3.5-stable + - v24.8.4.13-lts steps: - uses: actions/checkout@v4 From 29b046577e05c6ebc982d124a1f10bc346bd790b Mon Sep 17 00:00:00 2001 From: tdakkota Date: Mon, 23 Sep 2024 08:51:16 +0300 Subject: [PATCH 3/3] ci(golangci): disable gosec check G115 --- .golangci.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index f48cd8a3..c58b969a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,4 +1,7 @@ linters-settings: + gosec: + excludes: + - G115 # Annoying and have a lot of false-positive results. govet: check-shadowing: true gocyclo: @@ -95,41 +98,41 @@ issues: # Disable linters that are not needed for testing infra. - path: internal/cht - linters: [ gosec ] + linters: [gosec] - path: _test\.go text: "Combine" - linters: [ gocritic ] + linters: [gocritic] # Check that equal to self is true - - linters: [ gocritic ] - source: '(assert|require).+Equal' - text: 'dupArg' + - linters: [gocritic] + source: "(assert|require).+Equal" + text: "dupArg" path: _test\.go # Ignore shadowing of err. - - linters: [ govet ] + - linters: [govet] text: 'declaration of "(err|ctx|log|lg|c)"' # Probably some broken linter for generics? - - linters: [ revive ] + - linters: [revive] text: 'receiver-naming: receiver name \S+ should be consistent with previous receiver name \S+ for invalid-type' # Ignore linters in main packages. - path: main\.go - linters: [ goconst, funlen, gocognit, gocyclo ] + linters: [goconst, funlen, gocognit, gocyclo] - path: main\.go - linters: [ gosec ] + linters: [gosec] text: "G307" - source: 'func Fuzz.+\(f \*testing\.F\)' - linters: [ stylecheck ] + linters: [stylecheck] text: "ST1003" # underscores lol - path: (internal|cmd) - linters: [ revive ] + linters: [revive] text: "package-comments" - - linters: [ revive ] + - linters: [revive] text: "comment on exported const .+ should be of the form"