Skip to content

Commit 87ff743

Browse files
committed
bump go version
1 parent 9a99c59 commit 87ff743

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

.github/workflows/build-test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v3
1919
with:
20-
go-version: '~1.20.10'
20+
go-version: '~1.21.7'
2121
check-latest: true
2222
- name: Run static analysis tests
2323
shell: bash
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/checkout@v3
3030
- uses: actions/setup-go@v3
3131
with:
32-
go-version: '~1.20.10'
32+
go-version: '~1.21.7'
3333
- run: go test -v -timeout 10m -race ./...
3434
env:
3535
CGO_CFLAGS: "-O -D__BLST_PORTABLE__" # Set the CGO flags to use the portable version of BLST
@@ -47,7 +47,7 @@ jobs:
4747
- name: Set up Go
4848
uses: actions/setup-go@v3
4949
with:
50-
go-version: '~1.20.10'
50+
go-version: '~1.21.7'
5151
- name: Run e2e tests
5252
shell: bash
5353
run: scripts/tests.e2e.sh

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Go
2121
uses: actions/setup-go@v3
2222
with:
23-
go-version: '~1.20.10'
23+
go-version: '~1.21.7'
2424
- name: Set up arm64 cross compiler
2525
run: |
2626
sudo apt-get -y update

.golangci.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ linters-settings:
106106
excludes:
107107
- G107 # https://securego.io/docs/rules/g107.html
108108
depguard:
109-
list-type: blacklist
110-
packages-with-error-message:
111-
- io/ioutil: 'io/ioutil is deprecated. Use package io or os instead.'
112-
- github.com/stretchr/testify/assert: 'github.com/stretchr/testify/require should be used instead.'
113-
include-go-root: true
109+
rules:
110+
packages:
111+
deny:
112+
- pkg: "io/ioutil"
113+
desc: io/ioutil is deprecated. Use package io or os instead.
114+
- pkg: "github.com/stretchr/testify/assert"
115+
desc: github.com/stretchr/testify/require should be used instead.

local/network_test.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ func TestWrongNetworkConfigs(t *testing.T) {
482482
}
483483
require := require.New(t)
484484
for name, tt := range tests {
485-
t.Run(name, func(t *testing.T) {
485+
t.Run(name, func(*testing.T) {
486486
net, err := newNetwork(logging.NoLog{}, newMockAPISuccessful, &localTestSuccessfulNodeProcessCreator{}, "", "", false, false, false)
487487
require.NoError(err)
488488
err = net.loadConfig(context.Background(), tt.config)
@@ -1164,11 +1164,11 @@ func TestWriteFiles(t *testing.T) {
11641164

11651165
stakingKeyPath := filepath.Join(tmpDir, stakingKeyFileName)
11661166
stakingCertPath := filepath.Join(tmpDir, stakingCertFileName)
1167-
stakingSigningKeyPath := filepath.Join(tmpDir, stakingSigningKeyFileName)
1167+
stakingSigningKeyPath := filepath.Join(tmpDir, stakingSigningKeyFileName)
11681168
genesisPath := filepath.Join(tmpDir, genesisFileName)
11691169
configFilePath := filepath.Join(tmpDir, configFileName)
1170-
chainConfigDir := filepath.Join(tmpDir, chainConfigSubDir)
1171-
subnetConfigDir := filepath.Join(tmpDir, subnetConfigSubDir)
1170+
chainConfigDir := filepath.Join(tmpDir, chainConfigSubDir)
1171+
subnetConfigDir := filepath.Join(tmpDir, subnetConfigSubDir)
11721172
cChainConfigPath := filepath.Join(tmpDir, chainConfigSubDir, "C", configFileName)
11731173

11741174
type test struct {
@@ -1239,6 +1239,7 @@ func TestWriteFiles(t *testing.T) {
12391239
}
12401240

12411241
for _, tt := range tests {
1242+
tt := tt
12421243
t.Run(tt.name, func(t *testing.T) {
12431244
require := require.New(t)
12441245
flags, err := writeFiles(0, tt.genesis, tmpDir, &tt.nodeConfig)

local/node_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func TestAttachPeer(t *testing.T) {
213213
nodeID: ids.GenerateTestNodeID(),
214214
networkID: constants.MainnetID,
215215
p2pPort: 1,
216-
getConnFunc: func(ctx context.Context, n node.Node) (net.Conn, error) {
216+
getConnFunc: func(context.Context, node.Node) (net.Conn, error) {
217217
return peerConn, nil
218218
},
219219
attachedPeers: map[string]peer.Peer{},

0 commit comments

Comments
 (0)