Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

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

package cobra
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down