ci: bump to go 1.16 (#166)
Required updates to the thirdparty test suite due to modules changes in go toolchain.
This commit is contained in:
committed by
GitHub
parent
f798093d69
commit
6bad393fdc
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.14.x, 1.15.x]
|
||||
go-version: [1.15.x, 1.16.x]
|
||||
platform: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
lint:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.15.x]
|
||||
go-version: [1.16.x]
|
||||
platform: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
thirdparty:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.14.x, 1.15.x]
|
||||
go-version: [1.15.x, 1.16.x]
|
||||
platform: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
|
||||
6
go.sum
6
go.sum
@@ -1,23 +1,29 @@
|
||||
github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
golang.org/x/arch v0.0.0-20210405154355-08b684f594a5 h1:nC014MsyPv4PvUtz1bc2vD7b5wRCKlb3j0EVb4cMBuA=
|
||||
golang.org/x/arch v0.0.0-20210405154355-08b684f594a5/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
|
||||
20
tests/thirdparty/packages_test.go
vendored
20
tests/thirdparty/packages_test.go
vendored
@@ -60,6 +60,7 @@ type PackageTest struct {
|
||||
Latest bool // use latest version of the package
|
||||
|
||||
repopath string // path the repo is cloned to
|
||||
cwd string // working directory to execute commands in
|
||||
}
|
||||
|
||||
// Run the test.
|
||||
@@ -79,6 +80,7 @@ func (t *PackageTest) checkout() {
|
||||
dst := filepath.Join(t.WorkDir, t.Name())
|
||||
t.git("clone", "--quiet", t.CloneURL(), dst)
|
||||
t.repopath = dst
|
||||
t.cd(t.repopath)
|
||||
|
||||
// Checkout specific version.
|
||||
if t.Latest {
|
||||
@@ -115,15 +117,22 @@ func (t *PackageTest) replaceavo() {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if filepath.Base(path) != "go.mod" {
|
||||
dir, base := filepath.Split(path)
|
||||
if base != "go.mod" {
|
||||
return nil
|
||||
}
|
||||
t.gotool("mod", "edit", "-replace=github.com/mmcloughlin/avo="+avodir, path)
|
||||
t.cd(dir)
|
||||
t.gotool("mod", "tidy")
|
||||
t.gotool("get", "github.com/mmcloughlin/avo")
|
||||
t.gotool("mod", "edit", "-replace=github.com/mmcloughlin/avo="+avodir)
|
||||
t.gotool("mod", "download")
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
t.cd(t.repopath)
|
||||
}
|
||||
|
||||
// generate runs generate commands.
|
||||
@@ -156,6 +165,11 @@ func (t *PackageTest) git(arg ...string) {
|
||||
// gotool runs a go command.
|
||||
func (t *PackageTest) gotool(arg ...string) {
|
||||
cmd := exec.Command(test.GoTool(), arg...)
|
||||
cmd.Dir = t.repopath
|
||||
cmd.Dir = t.cwd
|
||||
test.ExecCommand(t.T, cmd)
|
||||
}
|
||||
|
||||
// cd sets the working directory.
|
||||
func (t *PackageTest) cd(dir string) {
|
||||
t.cwd = dir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user