Skip to content

Commit

Permalink
bump go version
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Feb 22, 2024
1 parent 9a99c59 commit 87ff743
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.21.7'
check-latest: true
- name: Run static analysis tests
shell: bash
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.21.7'
- run: go test -v -timeout 10m -race ./...
env:
CGO_CFLAGS: "-O -D__BLST_PORTABLE__" # Set the CGO flags to use the portable version of BLST
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.21.7'
- name: Run e2e tests
shell: bash
run: scripts/tests.e2e.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.21.7'
- name: Set up arm64 cross compiler
run: |
sudo apt-get -y update
Expand Down
12 changes: 7 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ linters-settings:
excludes:
- G107 # https://securego.io/docs/rules/g107.html
depguard:
list-type: blacklist
packages-with-error-message:
- io/ioutil: 'io/ioutil is deprecated. Use package io or os instead.'
- github.com/stretchr/testify/assert: 'github.com/stretchr/testify/require should be used instead.'
include-go-root: true
rules:
packages:
deny:
- pkg: "io/ioutil"
desc: io/ioutil is deprecated. Use package io or os instead.
- pkg: "github.com/stretchr/testify/assert"
desc: github.com/stretchr/testify/require should be used instead.
9 changes: 5 additions & 4 deletions local/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ func TestWrongNetworkConfigs(t *testing.T) {
}
require := require.New(t)
for name, tt := range tests {
t.Run(name, func(t *testing.T) {
t.Run(name, func(*testing.T) {
net, err := newNetwork(logging.NoLog{}, newMockAPISuccessful, &localTestSuccessfulNodeProcessCreator{}, "", "", false, false, false)
require.NoError(err)
err = net.loadConfig(context.Background(), tt.config)
Expand Down Expand Up @@ -1164,11 +1164,11 @@ func TestWriteFiles(t *testing.T) {

stakingKeyPath := filepath.Join(tmpDir, stakingKeyFileName)
stakingCertPath := filepath.Join(tmpDir, stakingCertFileName)
stakingSigningKeyPath := filepath.Join(tmpDir, stakingSigningKeyFileName)
stakingSigningKeyPath := filepath.Join(tmpDir, stakingSigningKeyFileName)
genesisPath := filepath.Join(tmpDir, genesisFileName)
configFilePath := filepath.Join(tmpDir, configFileName)
chainConfigDir := filepath.Join(tmpDir, chainConfigSubDir)
subnetConfigDir := filepath.Join(tmpDir, subnetConfigSubDir)
chainConfigDir := filepath.Join(tmpDir, chainConfigSubDir)
subnetConfigDir := filepath.Join(tmpDir, subnetConfigSubDir)
cChainConfigPath := filepath.Join(tmpDir, chainConfigSubDir, "C", configFileName)

type test struct {
Expand Down Expand Up @@ -1239,6 +1239,7 @@ func TestWriteFiles(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
require := require.New(t)
flags, err := writeFiles(0, tt.genesis, tmpDir, &tt.nodeConfig)
Expand Down
2 changes: 1 addition & 1 deletion local/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func TestAttachPeer(t *testing.T) {
nodeID: ids.GenerateTestNodeID(),
networkID: constants.MainnetID,
p2pPort: 1,
getConnFunc: func(ctx context.Context, n node.Node) (net.Conn, error) {
getConnFunc: func(context.Context, node.Node) (net.Conn, error) {
return peerConn, nil
},
attachedPeers: map[string]peer.Peer{},
Expand Down

0 comments on commit 87ff743

Please sign in to comment.