Skip to content

Commit

Permalink
Add golang 1.22 to github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnamiriyala committed Feb 12, 2024
1 parent a646058 commit cea8500
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 24 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ linters:
- cyclop
# deadcode Replaced by unused.
- decorder
- depguard
# depguard Need to be fixed with new depguard version
- dupword
- durationcheck
- errcheck
Expand Down
20 changes: 11 additions & 9 deletions build/install_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
)
Expand Down

0 comments on commit cea8500

Please sign in to comment.