From 7ef2f7cb9a0c6e44074df02df4315c19717c0615 Mon Sep 17 00:00:00 2001 From: Krishna Miriyala Date: Mon, 12 Feb 2024 10:18:41 -0800 Subject: [PATCH] Add golang 1.22 to github workflows --- .github/workflows/daily.yml | 14 +++++++------- .github/workflows/go.yml | 14 +++++++------- .golangci.yml | 2 +- build/install_tools.sh | 20 +++++++++++--------- 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index f2dcea2..fc52da0 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -15,11 +15,11 @@ jobs: runs-on: [ubuntu-latest] strategy: matrix: - go: ['1.19', '1.20', '1.21'] + go: ['1.19', '1.20', '1.21', '1.22'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go using version for latest ${{ matrix.go }} version - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} check-latest: true @@ -30,7 +30,7 @@ jobs: mkdir -p $(go env GOCACHE) sudo make test benchmarks - name: Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: test-results/coverage.out @@ -41,11 +41,11 @@ jobs: runs-on: [ubuntu-latest] strategy: matrix: - go: ['1.19', '1.20', '1.21'] + go: ['1.19', '1.20', '1.21', '1.22'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go using version for latest ${{ matrix.go }} version - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} check-latest: true diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 39bf289..cdeb9af 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,11 +23,11 @@ jobs: runs-on: [ubuntu-latest] strategy: matrix: - go: ['1.19', '1.20', '1.21'] + go: ['1.19', '1.20', '1.21', '1.22'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go using version for latest ${{ matrix.go }} version - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} check-latest: true @@ -38,7 +38,7 @@ jobs: mkdir -p $(go env GOCACHE) sudo make test - name: Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: test-results/coverage.out @@ -49,11 +49,11 @@ jobs: runs-on: [ubuntu-latest] strategy: matrix: - go: ['1.19', '1.20', '1.21'] + go: ['1.19', '1.20', '1.21', '1.22'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go using version for latest ${{ matrix.go }} version - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} check-latest: true diff --git a/.golangci.yml b/.golangci.yml index c202291..1accb9d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -18,7 +18,7 @@ linters: - cyclop # deadcode Replaced by unused. - decorder - - depguard + # depguard Need to be fixed with new depguard version - dupword - durationcheck - errcheck diff --git a/build/install_tools.sh b/build/install_tools.sh index f08e8ef..ef109d3 100755 --- a/build/install_tools.sh +++ b/build/install_tools.sh @@ -4,21 +4,23 @@ set -eux source $(dirname "$0")/env.sh FORCE=false -GODLV_VERSION=${GODLV_VERSION:=1.21.0} -if go version | grep 1.2; then +GODLV_VERSION=${GODLV_VERSION:=1.22.0} +if go version | grep 1.20; then GOLNT_VERSION=${GOLNT_VERSION:=1.52.2} +elif go version | grep 1.2; then + GOLNT_VERSION=${GOLNT_VERSION:=1.56.1} else GOLNT_VERSION=${GOLNT_VERSION:=1.50.1} fi GOMRK_VERSION=${GOMRK_VERSION:=1.1.0} -SHFMT_VERSION=${SHFMT_VERSION:=3.7.0} -GOIMP_VERSION=${GOIMP_VERSION:=0.5.0} -GOIMPORTS_REVISER_VERSION=${GOIMPORTS_REVISER_VERSION:=3.4.5} -GOJQ_VERSION=${GOJQ_VERSION:=0.12.13} -TYPOS_VERSION=${TYPOS_VERSION:=1.13.6} +SHFMT_VERSION=${SHFMT_VERSION:=3.8.0} +GOIMP_VERSION=${GOIMP_VERSION:=0.17.0} +GOIMPORTS_REVISER_VERSION=${GOIMPORTS_REVISER_VERSION:=3.6.4} +GOJQ_VERSION=${GOJQ_VERSION:=0.12.14} +TYPOS_VERSION=${TYPOS_VERSION:=1.18.2} ADDLICENSE_VERSION=${ADDLICENSE_VERSION:=1.1.1} CODEOWNERS_VALIDATOR_VERSION=${CODEOWNERS_VALIDATOR_VERSION:=0.7.4} -YAMLFMT_VERSION=${YAMLFMT_VERSION:=0.9.0} +YAMLFMT_VERSION=${YAMLFMT_VERSION:=0.11.0} # With version check go_install() { @@ -30,7 +32,7 @@ go_install_any() { ([ ${FORCE} = false ] && $1 >/dev/null 2>&1) || go install $2@$3 } -go version | grep '1.19\|1.20\|1.21' || ( +go version | grep '1.19\|1.20\|1.21\|1.22' || ( echo "Install supported version (>=1.19) of golang to use saas-ci" exit 1 )