Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add golang 1.22 to github workflows #102

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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