Skip to content

Commit

Permalink
ci(testing): add go1.22 version (#3842)
Browse files Browse the repository at this point in the history
* chore: update gin version and remove unnecessary steps in GitHub workflows

- Update the version of gin to v1.56.1 in the `.github/workflows/gin.yml` file
- Add go version 1.22 to the list of supported versions in the `.github/workflows/gin.yml` file
- Remove the unnecessary step "Set up Go" in the `.github/workflows/goreleaser.yml` file
- Update the step name "Run GoReleaser" in the `.github/workflows/goreleaser.yml` file

Signed-off-by: appleboy <[email protected]>

* ci: update dependencies and CI configurations

- Update conditional Go version check in GitHub Actions workflow from `1.21.x` to `1.22.x`

Signed-off-by: Bo-Yi Wu <[email protected]>

* ci: improve CI Robustness and Test Reliability

- Add `-race` flag to the test-tags list in GitHub Actions workflow configuration

Signed-off-by: Bo-Yi Wu <[email protected]>

---------

Signed-off-by: appleboy <[email protected]>
Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy authored Feb 18, 2024
1 parent bb3519d commit 000fdb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/gin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ jobs:
- name: Setup golangci-lint
uses: golangci/[email protected]
with:
version: v1.55.2
version: v1.56.1
args: --verbose
test:
needs: lint
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go: ["1.18", "1.19", "1.20", "1.21"]
test-tags: ["", "-tags nomsgpack", '-tags "sonic avx"', "-tags go_json"]
go: ["1.18", "1.19", "1.20", "1.21", "1.22"]
test-tags:
["", "-tags nomsgpack", '-tags "sonic avx"', "-tags go_json", "-race"]
include:
- os: ubuntu-latest
go-build: ~/.cache/go-build
Expand Down Expand Up @@ -74,5 +75,5 @@ jobs:
flags: ${{ matrix.os }},go-${{ matrix.go }},${{ matrix.test-tags }}

- name: Format
if: matrix.go-version == '1.21.x'
if: matrix.go-version == '1.22.x'
run: diff -u <(echo -n) <(gofmt -d .)
6 changes: 2 additions & 4 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "^1"
-
name: Run GoReleaser
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
Expand Down

0 comments on commit 000fdb3

Please sign in to comment.