Skip to content

Commit c6e6068

Browse files
authored
Merge pull request #50 from KyberNetwork/upgrade
update version
2 parents 8cd0547 + c2723da commit c6e6068

File tree

15 files changed

+260
-2101
lines changed

15 files changed

+260
-2101
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
branch_tag: ${{ steps.get_tag.outputs.branch_tag }}
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3232

3333
- name: Extract branch
3434
shell: bash
@@ -75,13 +75,13 @@ jobs:
7575
- name: Add git config for Go private module
7676
run: git config --global url."https://${{ secrets.GH_PAT }}:[email protected]/".insteadOf https://github.com/
7777
- name: Checkout
78-
uses: actions/checkout@v3
78+
uses: actions/checkout@v4
7979
- name: Install Go
80-
uses: actions/setup-go@v4
80+
uses: actions/setup-go@v5
8181
with:
82-
go-version: "1.20.x"
82+
go-version: "1.24.x"
8383
- name: golangci-lint
84-
uses: golangci/golangci-lint-action@v3
84+
uses: golangci/golangci-lint-action@v8
8585
with:
8686
args: --config=.golangci.yml
8787
skip-pkg-cache: true
@@ -107,11 +107,11 @@ jobs:
107107
- prepare
108108
steps:
109109
- name: Checkout
110-
uses: actions/checkout@v3
110+
uses: actions/checkout@v4
111111
- name: Install Go
112-
uses: actions/setup-go@v4
112+
uses: actions/setup-go@v5
113113
with:
114-
go-version: "1.19.x"
114+
go-version: "1.24.x"
115115
- name: Run test
116116
run: go test -race -v ./...
117117

@@ -124,7 +124,7 @@ jobs:
124124
BRANCH_TAG: ${{ needs.prepare.outputs.current_branch }}
125125
steps:
126126
- name: Checkout
127-
uses: actions/checkout@v3
127+
uses: actions/checkout@v4
128128
- name: Prepare images
129129
id: images
130130
shell: bash
@@ -168,14 +168,14 @@ jobs:
168168
run: gcloud auth configure-docker
169169

170170
- name: Cache Docker layers
171-
uses: actions/cache@v3
171+
uses: actions/cache@v4
172172
with:
173173
path: /tmp/.buildx-cache
174174
key: ${{ runner.os }}-${{ env.SERVICE }}-buildx
175175
if: github.event_name != 'pull_request'
176176

177177
- name: Build and push
178-
uses: docker/build-push-action@v2
178+
uses: docker/build-push-action@v6
179179
with:
180180
context: .
181181
push: true

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: [ubuntu-22.04]
4040
steps:
4141
- name: Checkout
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
4343

4444
- name: Set up Docker Buildx
4545
uses: docker/setup-buildx-action@master
@@ -56,13 +56,13 @@ jobs:
5656
run: gcloud auth configure-docker
5757

5858
- name: Cache Docker layers
59-
uses: actions/cache@v3
59+
uses: actions/cache@v4
6060
with:
6161
path: /tmp/.buildx-cache
6262
key: ${{ runner.os }}-${{ env.SERVICE }}-buildx
6363

6464
- name: Build and push
65-
uses: docker/build-push-action@v2
65+
uses: docker/build-push-action@v6
6666
with:
6767
context: .
6868
push: true
@@ -95,14 +95,14 @@ jobs:
9595
VERSION_TAG: ${{ needs.prepare.outputs.version_tag }}
9696
steps:
9797
- name: Checkout
98-
uses: actions/checkout@v3
98+
uses: actions/checkout@v4
9999
with:
100100
fetch-depth: 0
101101

102102
- name: Setup Go
103-
uses: actions/setup-go@v4
103+
uses: actions/setup-go@v5
104104
with:
105-
go-version: "1.19.x"
105+
go-version: "1.24.x"
106106

107107
- name: Setup Git
108108
run: |

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
cmd/*/*
33
!cmd/*/*.go
44
*/cmd/*/*
5-
!*/cmd/*/*.go
5+
!*/cmd/*/*.go
6+
.env

.golangci.yml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
1-
run:
2-
deadline: 5m
3-
1+
version: "2"
42
linters:
5-
enable-all: true
3+
default: all
64
disable:
7-
- maligned
8-
- interfacer
9-
- scopelint
5+
- perfsprint
6+
- depguard
7+
- exhaustruct
108
- gomoddirectives
9+
- nlreturn
1110
- nolintlint
12-
- exhaustivestruct
13-
- wrapcheck
14-
- varnamelen
15-
- golint
1611
- paralleltest
17-
- exhaustruct
18-
- wsl
19-
- nlreturn
20-
- deadcode
21-
- ifshort
22-
- structcheck
23-
- nosnakecase
24-
- varcheck
25-
- sqlclosecheck
2612
- rowserrcheck
13+
- sqlclosecheck
14+
- varnamelen
2715
- wastedassign
16+
- wrapcheck
17+
- wsl
18+
exclusions:
19+
generated: lax
20+
presets:
21+
- comments
22+
- common-false-positives
23+
- legacy
24+
- std-error-handling
25+
paths:
26+
- third_party$
27+
- builtin$
28+
- examples$
29+
formatters:
30+
enable:
31+
- gci
32+
- gofmt
33+
- gofumpt
34+
- goimports
35+
exclusions:
36+
generated: lax
37+
paths:
38+
- third_party$
39+
- builtin$
40+
- examples$

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## BUILDER
2-
FROM golang:1.17 as builder
2+
FROM golang:1.24 AS builder
33

44
WORKDIR /src
55

@@ -9,7 +9,7 @@ RUN go build -o app ./cmd/service-name
99

1010

1111
## DEPLOY
12-
FROM debian:stretch
12+
FROM debian:bookworm
1313

1414
RUN apt-get update && \
1515
apt install -y ca-certificates && \

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.1'
22
services:
33
postgres:
4-
image: 'postgres:14-alpine'
4+
image: 'postgres:17-bookworm'
55
environment:
66
POSTGRES_DB: test
77
POSTGRES_USER: test

go.mod

Lines changed: 44 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,56 @@
11
module github.com/KyberNetwork/go-project-template
22

3-
go 1.20
3+
go 1.24.2
44

55
require (
6-
github.com/KyberNetwork/cclog v1.0.1
7-
github.com/TheZeroSlave/zapsentry v1.9.0
8-
github.com/ethereum/go-ethereum v1.10.25
9-
github.com/getsentry/sentry-go v0.12.0
10-
github.com/gin-contrib/pprof v1.3.0
11-
github.com/gin-gonic/gin v1.7.7
12-
github.com/golang-migrate/migrate/v4 v4.15.1
13-
github.com/jmoiron/sqlx v1.3.4
14-
github.com/joho/godotenv v1.4.0
15-
github.com/lib/pq v1.10.4
6+
github.com/KyberNetwork/cclog v1.1.2
7+
github.com/TheZeroSlave/zapsentry v1.23.0
8+
github.com/getsentry/sentry-go v0.33.0
9+
github.com/gin-contrib/pprof v1.5.3
10+
github.com/gin-gonic/gin v1.10.1
11+
github.com/golang-migrate/migrate/v4 v4.18.3
12+
github.com/jmoiron/sqlx v1.4.0
13+
github.com/joho/godotenv v1.5.1
14+
github.com/lib/pq v1.10.9
1615
github.com/pkg/errors v0.9.1
17-
github.com/shopspring/decimal v1.2.0
18-
github.com/stretchr/testify v1.7.2
19-
github.com/urfave/cli/v2 v2.10.2
20-
go.uber.org/zap v1.20.0
16+
github.com/shopspring/decimal v1.4.0
17+
github.com/urfave/cli/v2 v2.27.6
18+
go.uber.org/zap v1.27.0
2119
)
2220

2321
require (
24-
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
25-
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
26-
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
27-
github.com/davecgh/go-spew v1.1.1 // indirect
28-
github.com/deckarep/golang-set v1.8.0 // indirect
29-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
30-
github.com/gin-contrib/sse v0.1.0 // indirect
31-
github.com/go-ole/go-ole v1.2.1 // indirect
32-
github.com/go-playground/locales v0.13.0 // indirect
33-
github.com/go-playground/universal-translator v0.17.0 // indirect
34-
github.com/go-playground/validator/v10 v10.4.1 // indirect
35-
github.com/go-stack/stack v1.8.0 // indirect
36-
github.com/golang/protobuf v1.5.2 // indirect
37-
github.com/google/uuid v1.3.0 // indirect
38-
github.com/gorilla/websocket v1.4.2 // indirect
39-
github.com/hashicorp/errwrap v1.0.0 // indirect
40-
github.com/hashicorp/go-multierror v1.1.0 // indirect
41-
github.com/json-iterator/go v1.1.10 // indirect
42-
github.com/kr/text v0.2.0 // indirect
43-
github.com/leodido/go-urn v1.2.0 // indirect
44-
github.com/mattn/go-isatty v0.0.14 // indirect
22+
github.com/bytedance/sonic v1.13.2 // indirect
23+
github.com/bytedance/sonic/loader v0.2.4 // indirect
24+
github.com/cloudwego/base64x v0.1.5 // indirect
25+
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
26+
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
27+
github.com/gin-contrib/sse v1.1.0 // indirect
28+
github.com/go-playground/locales v0.14.1 // indirect
29+
github.com/go-playground/universal-translator v0.18.1 // indirect
30+
github.com/go-playground/validator/v10 v10.26.0 // indirect
31+
github.com/goccy/go-json v0.10.5 // indirect
32+
github.com/hashicorp/errwrap v1.1.0 // indirect
33+
github.com/hashicorp/go-multierror v1.1.1 // indirect
34+
github.com/json-iterator/go v1.1.12 // indirect
35+
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
36+
github.com/kr/pretty v0.3.1 // indirect
37+
github.com/leodido/go-urn v1.4.0 // indirect
38+
github.com/mattn/go-isatty v0.0.20 // indirect
4539
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
46-
github.com/modern-go/reflect2 v1.0.1 // indirect
47-
github.com/pmezard/go-difflib v1.0.0 // indirect
48-
github.com/rjeczalik/notify v0.9.1 // indirect
40+
github.com/modern-go/reflect2 v1.0.2 // indirect
41+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
42+
github.com/pierrec/lz4/v3 v3.3.5 // indirect
4943
github.com/russross/blackfriday/v2 v2.1.0 // indirect
50-
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
51-
github.com/tklauser/go-sysconf v0.3.5 // indirect
52-
github.com/tklauser/numcpus v0.2.2 // indirect
53-
github.com/ugorji/go/codec v1.1.7 // indirect
54-
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
55-
go.uber.org/atomic v1.7.0 // indirect
56-
go.uber.org/multierr v1.6.0 // indirect
57-
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
58-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
59-
google.golang.org/protobuf v1.27.1 // indirect
60-
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
61-
gopkg.in/yaml.v2 v2.4.0 // indirect
44+
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
45+
github.com/ugorji/go/codec v1.2.12 // indirect
46+
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
47+
go.uber.org/atomic v1.11.0 // indirect
48+
go.uber.org/multierr v1.11.0 // indirect
49+
golang.org/x/arch v0.17.0 // indirect
50+
golang.org/x/crypto v0.38.0 // indirect
51+
golang.org/x/net v0.40.0 // indirect
52+
golang.org/x/sys v0.33.0 // indirect
53+
golang.org/x/text v0.25.0 // indirect
54+
google.golang.org/protobuf v1.36.6 // indirect
6255
gopkg.in/yaml.v3 v3.0.1 // indirect
6356
)

0 commit comments

Comments
 (0)