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:
parent
2a5277810f
commit
4fd30b69ee
22
.github/workflows/Test.yml
vendored
22
.github/workflows/Test.yml
vendored
@ -18,29 +18,35 @@ jobs:
|
|||||||
- ubuntu
|
- ubuntu
|
||||||
- macOS
|
- macOS
|
||||||
go:
|
go:
|
||||||
- 1.14.x
|
- 14
|
||||||
- 1.15.x
|
- 15
|
||||||
name: '${{ matrix.platform }} | ${{ matrix.go }}'
|
- 16
|
||||||
|
- 17
|
||||||
|
name: '${{ matrix.platform }} | 1.${{ matrix.go }}.x'
|
||||||
runs-on: ${{ matrix.platform }}-latest
|
runs-on: ${{ matrix.platform }}-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: 1.${{ matrix.go }}.x
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ matrix.go }}-
|
restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x-
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
export GOBIN=$HOME/go/bin
|
export GOBIN=$HOME/go/bin
|
||||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest
|
||||||
go install github.com/kyoh86/richgo
|
case "${{ matrix.go }}" in
|
||||||
go install github.com/mitchellh/gox
|
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
|
- run: PATH=$HOME/go/bin/:$PATH make
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package cobra
|
package cobra
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package cobra
|
package cobra
|
||||||
|
Loading…
Reference in New Issue
Block a user