Skip to content

Commit 4062059

Browse files
authored
MM-54414: Bump up CI tool versions (#105)
* MM-54414: Bump up CI tool versions - Bump up action versions - Bump Go to 1.20.7 https://mattermost.atlassian.net/browse/MM-54414
1 parent 42a1669 commit 4062059

File tree

12 files changed

+110
-616
lines changed

12 files changed

+110
-616
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515

1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1919

2020
- name: Install Go
21-
uses: actions/setup-go@v2
21+
uses: actions/setup-go@v4
2222
with:
23-
go-version: 1.17.x
23+
go-version: 1.20.7
2424

2525
- name: check dependencies
2626
run: make check-deps
@@ -36,24 +36,3 @@ jobs:
3636
path: |
3737
./dist/*.tar.gz
3838
./dist/checksums.txt
39-
40-
image:
41-
runs-on: ubuntu-latest
42-
43-
steps:
44-
- name: Checkout code
45-
uses: actions/checkout@v2
46-
47-
- name: Set up QEMU
48-
uses: docker/setup-qemu-action@v1
49-
50-
- name: Set up Docker Buildx
51-
uses: docker/setup-buildx-action@v1
52-
53-
- name: Build image
54-
run: TAG=dirty make container
55-
56-
- name: Test image
57-
run: |
58-
docker run docker.io/mattermost/mattermost-push-proxy-amd64:dirty --version
59-
docker run --platform linux/arm64 docker.io/mattermost/mattermost-push-proxy-arm64:dirty --version

.github/workflows/golangci-lint.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ jobs:
1414
name: lint
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
18+
- name: Install Go
19+
uses: actions/setup-go@v4
20+
with:
21+
go-version: 1.20.7
1822
- name: golangci-lint
19-
uses: golangci/golangci-lint-action@v2
23+
uses: golangci/golangci-lint-action@v3
2024
with:
21-
version: latest
25+
version: v1.52.2

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717

1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121

2222
- name: Install Go
23-
uses: actions/setup-go@v2
23+
uses: actions/setup-go@v4
2424
with:
25-
go-version: 1.17.x
25+
go-version: 1.20.7
2626

2727
- name: Run tests
2828
run: |

.golangci.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
# options for analysis running
12
run:
3+
# timeout for analysis, e.g. 30s, 5m, default is 1m
24
timeout: 5m
35

46
linters-settings:
@@ -7,27 +9,17 @@ linters-settings:
79
govet:
810
check-shadowing: true
911
enable-all: true
12+
disable:
13+
- fieldalignment
1014

1115
linters:
1216
disable-all: true
1317
enable:
14-
- deadcode
1518
- gofmt
16-
# - golint Enable it later.
1719
- gosimple
1820
- govet
1921
- ineffassign
2022
- exportloopref
21-
- structcheck
23+
- staticcheck
2224
- unconvert
2325
- unused
24-
- varcheck
25-
- errcheck
26-
- staticcheck
27-
28-
issues:
29-
exclude-rules:
30-
- linters:
31-
- scopelint
32-
# ignore warnings from table tests. https://github.com/kyoh86/scopelint/issues/4
33-
path: ".*_test.go"

Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ TAG ?= $(shell git describe --tags --always --dirty)
124124

125125
# build with buildx
126126
.PHONY: container
127-
container: package-image init-docker-buildx
127+
container: package-image
128128
@for platform in $(PLATFORMS); do \
129129
echo "Starting build for $${platform} platform"; \
130130
docker buildx build \
@@ -151,11 +151,6 @@ manifest: push
151151
@for platform in $(ARCHS); do docker manifest annotate --arch "$${platform}" ${IMAGE}:${TAG} ${IMAGE}-$${platform}:${TAG}; done
152152
docker manifest push --purge $(IMAGE):$(TAG)
153153

154-
# enable buildx
155-
.PHONY: init-docker-buildx
156-
init-docker-buildx:
157-
./hack/init-buildx.sh
158-
159154
test:
160155
$(GO) test $(GOFLAGS) -v -timeout=180s ./...
161156

cmd/renew_apple_cert/create_csr/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"encoding/asn1"
99
"encoding/pem"
1010
"flag"
11-
"io/ioutil"
1211
"log"
1312
"os"
1413
"path"
@@ -77,7 +76,7 @@ func createAndWritePrivateKey(app, dirCSR string) (*rsa.PrivateKey, error) {
7776
Bytes: marshaledKey,
7877
},
7978
)
80-
err = ioutil.WriteFile(path.Join(dirCSR, app+".key"), pemPrivateKey, 0664)
79+
err = os.WriteFile(path.Join(dirCSR, app+".key"), pemPrivateKey, 0664)
8180
if err != nil {
8281
return nil, err
8382
}
@@ -110,7 +109,7 @@ func createAndWriteCSR(cfg config, key *rsa.PrivateKey, dirCSR string) error {
110109
return err
111110
}
112111
cr := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csrBytes})
113-
err = ioutil.WriteFile(path.Join(dirCSR, cfg.App+".csr"), cr, 0664)
112+
err = os.WriteFile(path.Join(dirCSR, cfg.App+".csr"), cr, 0664)
114113
if err != nil {
115114
return err
116115
}

go.mod

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
11
module github.com/mattermost/mattermost-push-proxy
22

3-
go 1.17
3+
go 1.20
44

55
require (
66
github.com/appleboy/go-fcm v0.1.5
77
github.com/gorilla/handlers v1.5.1
88
github.com/gorilla/mux v1.8.0
99
github.com/kelseyhightower/envconfig v1.4.0
1010
github.com/kyokomi/emoji v2.2.4+incompatible
11-
github.com/prometheus/client_golang v1.12.1
12-
github.com/prometheus/common v0.32.1
13-
github.com/sideshow/apns2 v0.20.0
14-
github.com/stretchr/testify v1.7.1
15-
golang.org/x/net v0.0.0-20210525063256-abc453219eb5
16-
gopkg.in/natefinch/lumberjack.v2 v2.0.0
11+
github.com/prometheus/client_golang v1.16.0
12+
github.com/prometheus/common v0.44.0
13+
github.com/sideshow/apns2 v0.23.0
14+
github.com/stretchr/testify v1.8.0
15+
golang.org/x/net v0.15.0
16+
gopkg.in/natefinch/lumberjack.v2 v2.2.1
1717
gopkg.in/throttled/throttled.v1 v1.0.0
1818
)
1919

2020
require (
2121
github.com/PuerkitoBio/boom v0.0.0-20140219125548-fecdef1c97ca // indirect
2222
github.com/beorn7/perks v1.0.1 // indirect
23-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
23+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
2424
github.com/davecgh/go-spew v1.1.1 // indirect
25-
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
26-
github.com/felixge/httpsnoop v1.0.1 // indirect
27-
github.com/garyburd/redigo v1.6.0 // indirect
28-
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
29-
github.com/golang/protobuf v1.5.2 // indirect
30-
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
25+
github.com/felixge/httpsnoop v1.0.3 // indirect
26+
github.com/garyburd/redigo v1.6.4 // indirect
27+
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
28+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
29+
github.com/golang/protobuf v1.5.3 // indirect
30+
github.com/kr/text v0.2.0 // indirect
31+
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
3132
github.com/olekukonko/ts v0.0.0-20171002115256-78ecb04241c0 // indirect
3233
github.com/pmezard/go-difflib v1.0.0 // indirect
33-
github.com/prometheus/client_model v0.2.0 // indirect
34-
github.com/prometheus/procfs v0.7.3 // indirect
34+
github.com/prometheus/client_model v0.4.0 // indirect
35+
github.com/prometheus/procfs v0.11.1 // indirect
3536
github.com/rakyll/pb v0.0.0-20160123035540-8d46b8b097ef // indirect
36-
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
37-
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
38-
golang.org/x/text v0.3.6 // indirect
39-
google.golang.org/protobuf v1.26.0 // indirect
40-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
37+
github.com/rogpeppe/go-internal v1.11.0 // indirect
38+
golang.org/x/crypto v0.13.0 // indirect
39+
golang.org/x/sys v0.12.0 // indirect
40+
golang.org/x/text v0.13.0 // indirect
41+
google.golang.org/protobuf v1.31.0 // indirect
42+
gopkg.in/yaml.v3 v3.0.1 // indirect
4143
)

0 commit comments

Comments
 (0)