Skip to content

Commit

Permalink
chore: refactor Go projects and update CI configs
Browse files Browse the repository at this point in the history
- Update Go versions in CI workflow to include 1.20, 1.21, and 1.22, and remove versions below 1.18
- Change directory structure for tests in `example36-performance` and `example52-ring-buffer-queue`
- Add `go.mod` file for `example36-performance` with Go version 1.21.4
- Create `go.mod` file for `example52-ring-buffer-queue` specifying Go version 1.21.4 and dependencies
- Introduce `go.sum` for `example52-ring-buffer-queue` with checksums for dependencies

Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Feb 18, 2024
1 parent 666f93d commit d3fee58
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go: [1.14, 1.15, 1.16, 1.17, 1.18, 1.19]
go: [1.18, 1.19, "1.20", 1.21, 1.22]
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
env:
Expand All @@ -32,5 +32,5 @@ jobs:

- name: Run Testing
run: |
go test -v -bench=. ./example36-performance/...
go test -v -run=^$ -benchmem -bench . ./example52-ring-buffer-queue/...
cd example36-performance && go test -v -bench=. ./...
cd example52-ring-buffer-queue && go test -v -run=^$ -benchmem -bench . ./...
3 changes: 3 additions & 0 deletions example36-performance/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module example

go 1.21.4
11 changes: 11 additions & 0 deletions example52-ring-buffer-queue/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module example

go 1.21.4

require github.com/stretchr/testify v1.8.4

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
10 changes: 10 additions & 0 deletions example52-ring-buffer-queue/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit d3fee58

Please sign in to comment.