Skip to content

Commit 4a4f627

Browse files
authored
chore: maintenance stuff (#161)
1 parent cc11bee commit 4a4f627

8 files changed

Lines changed: 27 additions & 24 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ jobs:
1414
name: 👷 Test & Build
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: Set up Go
18-
uses: actions/setup-go@v3
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-go@v4
1919
with:
20-
go-version: "1.19"
21-
22-
- uses: actions/checkout@v2
20+
go-version-file: 'go.mod'
2321

2422
- name: Test
2523
env:

.github/workflows/lint.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v2
16-
with:
17-
fetch-depth: 0
15+
uses: actions/checkout@v4
1816

1917
- name: Commit message linter
20-
uses: wagoid/commitlint-github-action@v4
18+
uses: wagoid/commitlint-github-action@v5
2119

22-
- name: Setup Go
23-
uses: actions/setup-go@v3
20+
- uses: actions/setup-go@v4
2421
with:
25-
go-version: '1.19'
22+
go-version-file: 'go.mod'
2623

2724
- name: Tidy
2825
run: go mod tidy -v && git diff --no-patch --exit-code || { git status; echo 'Unchecked diff, did you forget go mod tidy again?' ; false ; };
26+
27+
- name: Linters
28+
run: make lint
29+

.github/workflows/reviewdog.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@ jobs:
1111
name: 🐶 Reviewdog
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515

1616
- uses: reviewdog/action-setup@v1
1717
with:
1818
reviewdog_version: latest
1919

20-
- name: Setup Go
21-
uses: actions/setup-go@v3
20+
- uses: actions/setup-go@v4
2221
with:
23-
go-version: "1.19"
22+
go-version-file: 'go.mod'
2423

2524
- name: Install golangci-lint
2625
run:
27-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2
26+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
2827

2928
- name: Reviewdog
3029
env:

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NAME = stream-cli
22

3-
GOLANGCI_VERSION = 1.49.0
3+
GOLANGCI_VERSION = 1.55.2
44
GOLANGCI = .bin/golangci/$(GOLANGCI_VERSION)/golangci-lint
55
$(GOLANGCI):
66
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(dir $(GOLANGCI)) v$(GOLANGCI_VERSION)
@@ -17,5 +17,6 @@ $(NAME):
1717
build:
1818
@go build ./cmd/$(NAME)
1919

20+
.PHONY: test
2021
test:
2122
@go test -v ./...

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/GetStream/stream-cli
22

3-
go 1.19
3+
go 1.22
44

55
require (
66
github.com/AlecAivazis/survey/v2 v2.3.4

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
7171
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
7272
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
7373
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
74+
github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps=
7475
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
7576
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
7677
github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc=
@@ -118,6 +119,7 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
118119
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
119120
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
120121
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
122+
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
121123
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
122124
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
123125
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -156,9 +158,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
156158
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
157159
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
158160
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
161+
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
159162
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
160163
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
161164
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
165+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
162166
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
163167
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
164168
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
@@ -195,6 +199,7 @@ github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
195199
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
196200
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
197201
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
202+
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
198203
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
199204
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
200205
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
@@ -426,6 +431,7 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T
426431
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
427432
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
428433
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U=
434+
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
429435
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
430436
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
431437
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=

pkg/cmd/chat/file/file_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"image"
66
"image/png"
7-
"io/ioutil"
87
"os"
98
"strings"
109
"testing"
@@ -19,7 +18,7 @@ func TestFileUploadAndDelete(t *testing.T) {
1918
ch := test.InitChannel(t)
2019
u := test.CreateUser()
2120

22-
tmpfile, err := ioutil.TempFile("", "*.txt")
21+
tmpfile, err := os.CreateTemp("", "*.txt")
2322
require.NoError(t, err)
2423

2524
err = os.WriteFile(tmpfile.Name(), []byte("hello\nworld\n"), 0o644)
@@ -52,7 +51,7 @@ func TestImageUploadAndDelete(t *testing.T) {
5251
ch := test.InitChannel(t)
5352
u := test.CreateUser()
5453

55-
tmpfile, err := ioutil.TempFile("", "*.png")
54+
tmpfile, err := os.CreateTemp("", "*.png")
5655
require.NoError(t, err)
5756

5857
m := image.NewRGBA(image.Rect(0, 0, 1, 1))

pkg/cmd/chat/message/message_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package message
22

33
import (
44
"bytes"
5-
"io/ioutil"
65
"os"
76
"testing"
87

@@ -31,7 +30,7 @@ func TestSendMessageWithFileAttachment(t *testing.T) {
3130
ch := test.InitChannel(t)
3231
u := test.CreateUser()
3332

34-
tmpfile, err := ioutil.TempFile("", "*.txt")
33+
tmpfile, err := os.CreateTemp("", "*.txt")
3534
require.NoError(t, err)
3635

3736
err = os.WriteFile(tmpfile.Name(), []byte("hello\nworld\n"), 0o644)

0 commit comments

Comments
 (0)