From b270f314fba283dd411e47aeaf1636b439769238 Mon Sep 17 00:00:00 2001 From: Viacheslav Poturaev Date: Tue, 20 Feb 2024 17:01:07 +0100 Subject: [PATCH 1/2] Update Go and golangci-lint --- templates/github/workflows/bench.yml | 2 +- templates/github/workflows/golangci-lint.yml | 6 +++--- templates/github/workflows/gorelease.yml | 2 +- templates/github/workflows/release-assets.yml | 2 +- templates/github/workflows/test-integration.yml | 2 +- templates/github/workflows/test-unit.yml | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/github/workflows/bench.yml b/templates/github/workflows/bench.yml index 51fbc24..f118ccd 100644 --- a/templates/github/workflows/bench.yml +++ b/templates/github/workflows/bench.yml @@ -21,7 +21,7 @@ env: GO111MODULE: "on" CACHE_BENCHMARK: "off" # Enables benchmark result reuse between runs, may skew latency results. RUN_BASE_BENCHMARK: "on" # Runs benchmark for PR base in case benchmark result is missing. - GO_VERSION: 1.21.x + GO_VERSION: 1.22.x jobs: bench: runs-on: ubuntu-latest diff --git a/templates/github/workflows/golangci-lint.yml b/templates/github/workflows/golangci-lint.yml index 5e985cc..6239219 100644 --- a/templates/github/workflows/golangci-lint.yml +++ b/templates/github/workflows/golangci-lint.yml @@ -21,13 +21,13 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.21.x + go-version: 1.22.x - uses: actions/checkout@v2 - name: golangci-lint - uses: golangci/golangci-lint-action@v3.7.0 + uses: golangci/golangci-lint-action@v4.0.0 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.55.2 + version: v1.56.2 # Optional: working directory, useful for monorepos # working-directory: somedir diff --git a/templates/github/workflows/gorelease.yml b/templates/github/workflows/gorelease.yml index 97ebe87..6356a9d 100644 --- a/templates/github/workflows/gorelease.yml +++ b/templates/github/workflows/gorelease.yml @@ -9,7 +9,7 @@ concurrency: cancel-in-progress: true env: - GO_VERSION: 1.21.x + GO_VERSION: 1.22.x jobs: gorelease: runs-on: ubuntu-latest diff --git a/templates/github/workflows/release-assets.yml b/templates/github/workflows/release-assets.yml index bfb238b..707c346 100644 --- a/templates/github/workflows/release-assets.yml +++ b/templates/github/workflows/release-assets.yml @@ -8,7 +8,7 @@ on: - created env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GO_VERSION: 1.21.x + GO_VERSION: 1.22.x jobs: build: name: Upload Release Assets diff --git a/templates/github/workflows/test-integration.yml b/templates/github/workflows/test-integration.yml index 572b007..44d9ba9 100644 --- a/templates/github/workflows/test-integration.yml +++ b/templates/github/workflows/test-integration.yml @@ -16,7 +16,7 @@ env: GO111MODULE: "on" RUN_BASE_COVERAGE: "on" # Runs test for PR base in case base test coverage is missing. DOCKER_COMPOSE_FILE: ./docker-compose.yml - GO_VERSION: 1.21.x + GO_VERSION: 1.22.x TARGET_DELTA_COV: 90 # Target coverage of changed lines, in percents jobs: test: diff --git a/templates/github/workflows/test-unit.yml b/templates/github/workflows/test-unit.yml index 4214222..9b6e93d 100644 --- a/templates/github/workflows/test-unit.yml +++ b/templates/github/workflows/test-unit.yml @@ -15,13 +15,13 @@ concurrency: env: GO111MODULE: "on" RUN_BASE_COVERAGE: "on" # Runs test for PR base in case base test coverage is missing. - COV_GO_VERSION: 1.21.x # Version of Go to collect coverage + COV_GO_VERSION: 1.22.x # Version of Go to collect coverage TARGET_DELTA_COV: 90 # Target coverage of changed lines, in percents jobs: test: strategy: matrix: - go-version: [ 1.19.x, 1.20.x, 1.21.x ] + go-version: [ 1.20.x, 1.21.x, 1.22.x ] runs-on: ubuntu-latest steps: - name: Install Go stable From afb03c590ef958b1c4b45e5db1b2532e20cadb01 Mon Sep 17 00:00:00 2001 From: Viacheslav Poturaev Date: Tue, 20 Feb 2024 17:02:23 +0100 Subject: [PATCH 2/2] Update Go and golangci-lint --- README.md | 2 +- makefiles/base.mk | 2 +- scripts/lint.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d899f45..6994b1f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ import _ "github.com/bool64/dev" // Include development helpers to project. Add `Makefile` to your module with includes standard targets. ```Makefile -#GOLANGCI_LINT_VERSION := "v1.55.2" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v1.56.2" # Optional configuration to pinpoint golangci-lint version. # The head of Makefile determines location of dev-go to include standard targets. GO ?= go diff --git a/makefiles/base.mk b/makefiles/base.mk index 4027c74..79a4626 100644 --- a/makefiles/base.mk +++ b/makefiles/base.mk @@ -1,4 +1,4 @@ -#GOLANGCI_LINT_VERSION := "v1.55.2" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v1.56.2" # Optional configuration to pinpoint golangci-lint version. # The head of Makefile determines location of dev-go to include standard targets. GO ?= go diff --git a/scripts/lint.sh b/scripts/lint.sh index 6af3ea3..d46b72c 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash [ -z "$GO" ] && GO=go -[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.55.2" +[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.56.2" # detecting GOPATH and removing trailing "/" if any GOPATH="$(go env GOPATH)"