From 566c866df981946b73b8af5d7d49d10955dc18bc Mon Sep 17 00:00:00 2001 From: Matias <83959431+mativm02@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:28:46 -0300 Subject: [PATCH] upgrading to Go 1.21 --- .github/workflows/ci-test.yml | 2 +- .github/workflows/linter.yaml | 4 ++-- .github/workflows/release.yml | 14 +++++++------- .golangci.yaml | 8 ++++---- go.mod | 2 +- repo-policy/main.tf | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 697d5f41c..092c40871 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -21,7 +21,7 @@ jobs: matrix: redis-version: [5] mongodb-version: [4.2] - go: [1.19] + go: [1.21] steps: - name: Checkout Tyk Pump diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index 9b15717a7..c40ef616e 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - go: [1.19] + go: [1.21] with: go: ${{ matrix.go }} redis: 5 @@ -34,7 +34,7 @@ jobs: uses: TykTechnologies/github-actions/.github/workflows/golangci.yaml@main with: main_branch: "master" - go_version: 1.19 + go_version: 1.21 sonarcloud: if: ${{ always() }} needs: [gotest, golangci] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab00f9c6d..2a817c081 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,9 +37,9 @@ jobs: fail-fast: false matrix: golang_cross: - - 1.19-bullseye + - 1.21-bullseye include: - - golang_cross: 1.19-bullseye + - golang_cross: 1.21-bullseye goreleaser: 'ci/goreleaser/goreleaser.yml' cgo: 0 rpmvers: 'el/7 el/8 el/9 amazon/2 amazon/2023' @@ -124,13 +124,13 @@ jobs: - uses: aws-actions/amazon-ecr-login@v2 id: ecr - if: ${{ matrix.golang_cross == '1.19-bullseye' }} + if: ${{ matrix.golang_cross == '1.21-bullseye' }} with: mask-password: 'true' - name: Docker metadata for CI id: metadata - if: ${{ matrix.golang_cross == '1.19-bullseye' }} + if: ${{ matrix.golang_cross == '1.21-bullseye' }} uses: docker/metadata-action@v5 with: images: ${{ steps.ecr.outputs.registry }}/tyk-pump @@ -144,7 +144,7 @@ jobs: type=semver,pattern=v{{version}},prefix=v - name: CI push - if: ${{ matrix.golang_cross == '1.19-bullseye' }} + if: ${{ matrix.golang_cross == '1.21-bullseye' }} shell: bash env: t: ${{ steps.metadata.outputs.tags }} @@ -160,7 +160,7 @@ jobs: done - uses: actions/upload-artifact@v3 - if: ${{ matrix.golang_cross == '1.19-bullseye' }} + if: ${{ matrix.golang_cross == '1.21-bullseye' }} with: name: deb retention-days: 1 @@ -169,7 +169,7 @@ jobs: !dist/*PAYG*.deb - uses: actions/upload-artifact@v3 - if: ${{ matrix.golang_cross == '1.19-bullseye' }} + if: ${{ matrix.golang_cross == '1.21-bullseye' }} with: name: rpm retention-days: 1 diff --git a/.golangci.yaml b/.golangci.yaml index 89978c797..c54731441 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -25,7 +25,7 @@ linters: - govet - gosec - ineffassign -# - lll + # - lll - misspell - revive - staticcheck @@ -65,7 +65,7 @@ linters-settings: extra-rules: true # Select the Go version to target. - lang-version: "1.19" + lang-version: "1.21" goimports: auto-fix: false @@ -79,7 +79,7 @@ linters-settings: enable-all: true lll: - auto-fix: true + auto-fix: true # Max line length; lines longer will be reported # '\t' is counted as 1 character by default, and can be changed with the 'tab-width' option line-length: 120 @@ -102,7 +102,7 @@ linters-settings: # https://staticcheck.io/docs/options#checks checks: ["all"] # Select the Go version to target. - go: "1.19" + go: "1.21" whitespace: auto-fix: true diff --git a/go.mod b/go.mod index 9f4c59a0d..62e3219d0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/TykTechnologies/tyk-pump -go 1.19 +go 1.21 require ( github.com/DataDog/datadog-go v4.7.0+incompatible diff --git a/repo-policy/main.tf b/repo-policy/main.tf index e4987879a..a2615fef8 100644 --- a/repo-policy/main.tf +++ b/repo-policy/main.tf @@ -49,11 +49,11 @@ module "tyk-pump" { { branch = "master", reviewers = "1", convos = "false", - required_tests = ["1.19-bullseye", "Go 1.19 tests", "api-tests (sha256, mongo44)", "api-tests (sha256, postgres15)", "api-tests (murmur64, mongo44)", "api-tests (murmur64, postgres15)"] }, + required_tests = ["1.21-bullseye", "Go 1.21 tests", "api-tests (sha256, mongo44)", "api-tests (sha256, postgres15)", "api-tests (murmur64, mongo44)", "api-tests (murmur64, postgres15)"] }, { branch = "release-1.8", reviewers = "0", convos = "false", source_branch = "master", - required_tests = ["1.19-bullseye", "Go 1.19 tests"] }, + required_tests = ["1.21-bullseye", "Go 1.21 tests"] }, ]) }