Skip to content

Commit 5ad0e5b

Browse files
authored
hk: bump deps, go 1.22.x in ci (#21)
* 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
1 parent 7101332 commit 5ad0e5b

File tree

10 files changed

+80
-1572
lines changed

10 files changed

+80
-1572
lines changed

.github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515
- name: Run lint
16-
uses: golangci/golangci-lint-action@v2
16+
uses: golangci/golangci-lint-action@v5
1717
with:
1818
version: latest

.github/workflows/release.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,34 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
- name: Set up Buildx
15-
uses: docker/setup-buildx-action@v1
15+
uses: docker/setup-buildx-action@v3
1616
- name: Login to Docker Hub
17-
uses: docker/login-action@v1
17+
uses: docker/login-action@v3
1818
with:
1919
username: ${{ secrets.DOCKERHUB_USERNAME }}
2020
password: ${{ secrets.DOCKERHUB_TOKEN }}
2121
- name: Setup Go
22-
uses: actions/setup-go@v2
22+
uses: actions/setup-go@v5
2323
with:
24-
go-version: 1.18.x
24+
go-version: 1.22.x
2525
- name: Cache Docker layers
26-
uses: actions/cache@v2
26+
uses: actions/cache@v4
2727
with:
2828
path: /tmp/.buildx-cache
2929
key: ${{ runner.os }}-buildx-${{ github.sha }}
3030
restore-keys: |
3131
${{ runner.os }}-buildx-
3232
- name: Cache Go modules
33-
uses: actions/cache@v2
33+
uses: actions/cache@v4
3434
with:
3535
path: ~/go/pkg/mod
3636
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
3737
restore-keys: |
3838
${{ runner.os }}-go-
3939
- name: Run GoReleaser
40-
uses: goreleaser/goreleaser-action@v2
40+
uses: goreleaser/goreleaser-action@v5
4141
with:
4242
version: latest
4343
args: release --rm-dist --skip-validate

.github/workflows/test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
go-version: [1.19.x, 1.20.x]
14+
go-version: [1.21.x, 1.22.x]
1515
services:
1616
postgres:
1717
image: postgres
@@ -26,16 +26,16 @@ jobs:
2626
--health-retries 5
2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
3030
- name: Cache dependencies
31-
uses: actions/cache@v2
31+
uses: actions/cache@v4
3232
with:
3333
path: ~/go/pkg/mod
3434
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
3535
restore-keys: |
3636
${{ runner.os }}-go-
3737
- name: Setup Go
38-
uses: actions/setup-go@v2
38+
uses: actions/setup-go@v5
3939
with:
4040
go-version: ${{ matrix.go-version }}
4141
- name: Run tests

client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package accord
33
import (
44
"context"
55
"io"
6-
"io/ioutil"
6+
"os"
77
"time"
88

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

77-
cacheDir, err := ioutil.TempDir(opt.Dir, "accord-client-cache")
77+
cacheDir, err := os.MkdirTemp(opt.Dir, "accord-client-cache")
7878
if err != nil {
7979
return nil, err
8080
}

client_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package accord_test
22

33
import (
44
"context"
5-
"io/ioutil"
65
"os"
76
"time"
87

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

2322
BeforeEach(func() {
2423
var err error
25-
tempDir, err = ioutil.TempDir("", "accord-client-test")
24+
tempDir, err = os.MkdirTemp("", "accord-client-test")
2625
Expect(err).NotTo(HaveOccurred())
2726

2827
backend = mock.New()

go.mod

+19-18
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
module github.com/bsm/accord
22

3-
go 1.17
3+
go 1.21
44

55
require (
6-
github.com/Masterminds/squirrel v1.5.2
7-
github.com/bsm/ginkgo/v2 v2.1.3
8-
github.com/bsm/gomega v1.18.1
6+
github.com/Masterminds/squirrel v1.5.4
7+
github.com/bsm/ginkgo/v2 v2.12.0
8+
github.com/bsm/gomega v1.27.10
99
github.com/dgraph-io/badger v1.6.2
10-
github.com/golang/protobuf v1.5.3
11-
github.com/google/uuid v1.3.0
12-
github.com/joho/godotenv v1.4.0
13-
github.com/lib/pq v1.10.4
14-
google.golang.org/grpc v1.56.3
15-
google.golang.org/protobuf v1.33.0
10+
github.com/golang/protobuf v1.5.4
11+
github.com/google/uuid v1.6.0
12+
github.com/joho/godotenv v1.5.1
13+
github.com/lib/pq v1.10.9
14+
google.golang.org/grpc v1.63.2
15+
google.golang.org/protobuf v1.34.0
1616
)
1717

1818
require (
1919
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
20-
github.com/cespare/xxhash v1.1.0 // indirect
21-
github.com/dgraph-io/ristretto v0.0.2 // indirect
22-
github.com/dustin/go-humanize v1.0.0 // indirect
20+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
21+
github.com/dgraph-io/ristretto v0.1.1 // indirect
22+
github.com/dustin/go-humanize v1.0.1 // indirect
23+
github.com/golang/glog v1.2.1 // indirect
2324
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
2425
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
25-
github.com/pkg/errors v0.8.1 // indirect
26-
golang.org/x/net v0.17.0 // indirect
27-
golang.org/x/sys v0.13.0 // indirect
28-
golang.org/x/text v0.13.0 // indirect
29-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
26+
github.com/pkg/errors v0.9.1 // indirect
27+
golang.org/x/net v0.24.0 // indirect
28+
golang.org/x/sys v0.19.0 // indirect
29+
golang.org/x/text v0.14.0 // indirect
30+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect
3031
)

0 commit comments

Comments
 (0)