Skip to content

Commit

Permalink
hk: bump deps, go 1.22.x in ci (#21)
Browse files Browse the repository at this point in the history
* hk: bump deps, go 1.22.x in ci

* ci: update all actions

* hk: deprecated ioutil temp dir -> os mk temp dir

* hk: update proto-gen-go locally, regenerate pb-s
  • Loading branch information
mxmCherry authored May 2, 2024
1 parent 7101332 commit 5ad0e5b
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 1,572 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v5
with:
version: latest
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,34 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.22.x
- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Cache Go modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist --skip-validate
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.19.x, 1.20.x]
go-version: [1.21.x, 1.22.x]
services:
postgres:
image: postgres
Expand All @@ -26,16 +26,16 @@ jobs:
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
Expand Down
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package accord
import (
"context"
"io"
"io/ioutil"
"os"
"time"

"github.com/bsm/accord/internal/cache"
Expand Down Expand Up @@ -74,7 +74,7 @@ type Client struct {
func RPCClient(ctx context.Context, rpc rpc.V1Client, opt *ClientOptions) (*Client, error) {
opt = opt.norm()

cacheDir, err := ioutil.TempDir(opt.Dir, "accord-client-cache")
cacheDir, err := os.MkdirTemp(opt.Dir, "accord-client-cache")
if err != nil {
return nil, err
}
Expand Down
3 changes: 1 addition & 2 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package accord_test

import (
"context"
"io/ioutil"
"os"
"time"

Expand All @@ -22,7 +21,7 @@ var _ = Describe("Client", func() {

BeforeEach(func() {
var err error
tempDir, err = ioutil.TempDir("", "accord-client-test")
tempDir, err = os.MkdirTemp("", "accord-client-test")
Expect(err).NotTo(HaveOccurred())

backend = mock.New()
Expand Down
37 changes: 19 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
module github.com/bsm/accord

go 1.17
go 1.21

require (
github.com/Masterminds/squirrel v1.5.2
github.com/bsm/ginkgo/v2 v2.1.3
github.com/bsm/gomega v1.18.1
github.com/Masterminds/squirrel v1.5.4
github.com/bsm/ginkgo/v2 v2.12.0
github.com/bsm/gomega v1.27.10
github.com/dgraph-io/badger v1.6.2
github.com/golang/protobuf v1.5.3
github.com/google/uuid v1.3.0
github.com/joho/godotenv v1.4.0
github.com/lib/pq v1.10.4
google.golang.org/grpc v1.56.3
google.golang.org/protobuf v1.33.0
github.com/golang/protobuf v1.5.4
github.com/google/uuid v1.6.0
github.com/joho/godotenv v1.5.1
github.com/lib/pq v1.10.9
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.34.0
)

require (
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/dgraph-io/ristretto v0.0.2 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/golang/glog v1.2.1 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/pkg/errors v0.8.1 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect
)
Loading

0 comments on commit 5ad0e5b

Please sign in to comment.