ci: test golang 1.16.x and 1.17.x too (#1425)

* ci: test golang 1.16.x too

* ci: style

* ci: test golang 1.17.x too

* bump go.mod to 1.15

* run gofmt
This commit is contained in:
Unai Martinez-Corral 2021-08-26 04:18:53 +01:00 committed by GitHub
parent 2a5277810f
commit 4fd30b69ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 9 deletions

View File

@ -18,29 +18,35 @@ jobs:
- ubuntu
- macOS
go:
- 1.14.x
- 1.15.x
name: '${{ matrix.platform }} | ${{ matrix.go }}'
- 14
- 15
- 16
- 17
name: '${{ matrix.platform }} | 1.${{ matrix.go }}.x'
runs-on: ${{ matrix.platform }}-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
go-version: 1.${{ matrix.go }}.x
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-${{ matrix.go }}-
key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x-
- run: |
export GOBIN=$HOME/go/bin
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest
go install github.com/kyoh86/richgo
go install github.com/mitchellh/gox
case "${{ matrix.go }}" in
16|17) _version='@latest';;
*) _version='';;
esac
go install github.com/kyoh86/richgo"${_version}"
go install github.com/mitchellh/gox"${_version}"
- run: PATH=$HOME/go/bin/:$PATH make

View File

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows
package cobra

View File

@ -1,3 +1,4 @@
//go:build windows
// +build windows
package cobra

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/spf13/cobra
go 1.14
go 1.15
require (
github.com/cpuguy83/go-md2man/v2 v2.0.1