Skip to content

Commit

Permalink
all: update supported go versions to 1.17 and 1.16 (#3827)
Browse files Browse the repository at this point in the history
Update supported Go versions to 1.17 and 1.16.

Go 1.15 is no longer supported. Go 1.17 has been released.
  • Loading branch information
leighmcculloch committed Aug 20, 2021
1 parent f33921d commit 5485133
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 41 deletions.
42 changes: 21 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ commands:
name: Download and install golang
command: |
sudo rm -rf /usr/local/go
wget https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz
wget https://dl.google.com/go/go1.17.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.17.linux-amd64.tar.gz
# install_go_deps installs the go dependencies of the project.
install_go_deps:
Expand Down Expand Up @@ -223,11 +223,11 @@ commands:
#-----------------------------------------------------------------------------#

jobs:
# check_code_1_16 performs code checks using Go 1.16.
check_code_1_16:
# check_code_1_17 performs code checks using Go 1.17.
check_code_1_17:
working_directory: /go/src/github.com/stellar/go
docker:
- image: golang:1.16
- image: golang:1.17
steps:
- install_go_deps
- check_go_deps
Expand All @@ -237,11 +237,11 @@ jobs:
- staticcheck
- build_packages

# test_code_1_15 performs all package tests using Go 1.15.
test_code_1_15:
# test_code_1_16 performs all package tests using Go 1.16.
test_code_1_16:
working_directory: /go/src/github.com/stellar/go
docker:
- image: golang:1.15
- image: golang:1.16
environment:
GO111MODULE: "on"
PGHOST: localhost
Expand All @@ -257,11 +257,11 @@ jobs:
- install_go_deps
- test_packages

# test_code_1_15 performs all package tests using Go 1.15 and Postgres 10.
test_code_1_15_postgres10:
# test_code_1_16 performs all package tests using Go 1.16 and Postgres 10.
test_code_1_16_postgres10:
working_directory: /go/src/github.com/stellar/go
docker:
- image: golang:1.15
- image: golang:1.16
environment:
GO111MODULE: "on"
PGHOST: localhost
Expand All @@ -278,11 +278,11 @@ jobs:
- install_go_deps
- test_packages

# test_code_1_16 performs all package tests using Go 1.16.
test_code_1_16:
# test_code_1_17 performs all package tests using Go 1.17.
test_code_1_17:
working_directory: /go/src/github.com/stellar/go
docker:
- image: golang:1.16
- image: golang:1.17
environment:
GO111MODULE: "on"
PGHOST: localhost
Expand All @@ -298,11 +298,11 @@ jobs:
- install_go_deps
- test_packages

# test_code_1_16 performs all package tests using Go 1.16 and Postgres 10.
test_code_1_16_postgres10:
# test_code_1_17 performs all package tests using Go 1.17 and Postgres 10.
test_code_1_17_postgres10:
working_directory: /go/src/github.com/stellar/go
docker:
- image: golang:1.16
- image: golang:1.17
environment:
GO111MODULE: "on"
PGHOST: localhost
Expand All @@ -325,7 +325,7 @@ jobs:
publish_artifacts:
working_directory: /go/src/github.com/stellar/go
docker:
- image: golang:1.16
- image: golang:1.17
steps:
- check_deprecations
- install_go_deps
Expand Down Expand Up @@ -468,11 +468,11 @@ workflows:

check_code_and_test:
jobs:
- check_code_1_16
- test_code_1_15
- test_code_1_15_postgres10
- check_code_1_17
- test_code_1_16
- test_code_1_16_postgres10
- test_code_1_17
- test_code_1_17_postgres10
# run the integration tests ...
# ... without captive core
- test_horizon_integration
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.16.5]
go: [1.17]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.16.5, 1.15.13]
go: [1.17, 1.16.7]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.16.5, 1.15.13]
go: [1.17, 1.16.7]
pg: [9.6.5, 10]
runs-on: ${{ matrix.os }}
services:
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/stellar/go

go 1.15
go 1.16

require (
cloud.google.com/go/firestore v1.5.0 // indirect
Expand Down Expand Up @@ -30,7 +30,6 @@ require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jarcoal/httpmock v0.0.0-20161210151336-4442edb3db31
github.com/jmoiron/sqlx v1.2.0
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
github.com/klauspost/compress v0.0.0-20161106143436-e3b7981a12dd // indirect
github.com/klauspost/cpuid v0.0.0-20160302075316-09cded8978dc // indirect
github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6 // indirect
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
Expand Down Expand Up @@ -220,8 +219,6 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM=
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v0.0.0-20161106143436-e3b7981a12dd h1:vQ0EEfHpdFUtNRj1ri25MUq5jb3Vma+kKhLyjeUTVow=
github.com/klauspost/compress v0.0.0-20161106143436-e3b7981a12dd/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
Expand Down
2 changes: 1 addition & 1 deletion golist.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

go list -deps -test -f '{{with .Module}}{{.Path}} {{.Version}}{{end}}' ./... | LC_ALL=C sort -u
go list -f '{{with .Module}}{{.Path}} {{.Version}}{{end}}' all | LC_ALL=C sort -u
1 change: 1 addition & 0 deletions ingest/ledgerbackend/stellar_core_runner_posix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package ledgerbackend
Expand Down
1 change: 1 addition & 0 deletions ingest/ledgerbackend/stellar_core_runner_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package ledgerbackend
Expand Down
1 change: 1 addition & 0 deletions services/horizon/internal/ingest/sample_changes_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build update
// +build update

package ingest
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/test/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (i *Test) prepareShutdownHandlers() {
// stopped even if ingestion or testing fails.
i.t.Cleanup(i.Shutdown)

c := make(chan os.Signal)
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
<-c
Expand Down
1 change: 1 addition & 0 deletions services/keystore/cmd/keystored/dev.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !aws
// +build !aws

package main
Expand Down
10 changes: 5 additions & 5 deletions support/render/problem/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ func TestRender(t *testing.T) {
500,
}, {
"renders the type correctly",
P{Type: "foo"},
P{Type: "foo", Status: 500},
[]string{"foo"},
0,
500,
}, {
"renders the status correctly",
P{Status: 201},
[]string{"201"},
201,
}, {
"renders the extras correctly",
P{Extras: map[string]interface{}{"hello": "stellar"}},
P{Extras: map[string]interface{}{"hello": "stellar"}, Status: 500},
[]string{"hello", "stellar"},
0,
500,
},
}

Expand Down Expand Up @@ -105,7 +105,7 @@ func TestInflate(t *testing.T) {
want string
}{
"renders the type correctly",
P{Type: "https://stellar.org/horizon-errors/not_found"},
P{Type: "https://stellar.org/horizon-errors/not_found", Status: 404},
"https://stellar.org/horizon-errors/not_found",
}

Expand Down
10 changes: 5 additions & 5 deletions support/render/problem/problem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ func TestProblemRender(t *testing.T) {
500,
}, {
"renders the type correctly",
P{Type: "foo"},
P{Type: "foo", Status: 500},
[]string{"foo"},
0,
500,
}, {
"renders the status correctly",
P{Status: 201},
[]string{"201"},
201,
}, {
"renders the extras correctly",
P{Extras: map[string]interface{}{"hello": "stellar"}},
P{Extras: map[string]interface{}{"hello": "stellar"}, Status: 500},
[]string{"hello", "stellar"},
0,
500,
},
}

Expand Down Expand Up @@ -112,7 +112,7 @@ func TestProblemInflate(t *testing.T) {
want string
}{
"renders the type correctly",
P{Type: "https://stellar.org/horizon-errors/not_found"},
P{Type: "https://stellar.org/horizon-errors/not_found", Status: 404},
"https://stellar.org/horizon-errors/not_found",
}

Expand Down
1 change: 1 addition & 0 deletions xdr/fuzz/jsonclaimpredicate/fuzz.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build gofuzz
// +build gofuzz

package jsonclaimpredicate
Expand Down

0 comments on commit 5485133

Please sign in to comment.