ci: style

This commit is contained in:
umarcor 2021-08-17 14:03:34 +02:00
parent 113cbc7bb2
commit 65c2074cbe

View file

@ -18,29 +18,32 @@ jobs:
- ubuntu - ubuntu
- macOS - macOS
go: go:
- 1.14.x - 14
- 1.15.x - 15
- 1.16.x - 16
name: '${{ matrix.platform }} | ${{ matrix.go }}' 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
[ "${{ matrix.go }}" = "1.16.x" ] && _version='@latest' || _version='' case "${{ matrix.go }}" in
16) _version='@latest';;
*) _version='';;
esac
go install github.com/kyoh86/richgo"${_version}" go install github.com/kyoh86/richgo"${_version}"
go install github.com/mitchellh/gox"${_version}" go install github.com/mitchellh/gox"${_version}"