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

chore(ci): use golangci-lint-action #1477

Merged
merged 1 commit into from Dec 7, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/Test.yml → .github/workflows/test.yml
Expand Up @@ -9,6 +9,20 @@ env:

jobs:

golangci-lint:
runs-on: ubuntu-latest
steps:

- uses: actions/setup-go@v2
with:
go-version: '1.17'

- uses: actions/checkout@v2

- uses: golangci/golangci-lint-action@v2
with:
version: latest
args: --verbose

test-unix:
strategy:
Expand Down Expand Up @@ -40,16 +54,14 @@ jobs:

- run: |
export GOBIN=$HOME/go/bin
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest
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

- run: PATH=$HOME/go/bin/:$PATH make test cobra_generator

test-win:
name: MINGW64
Expand Down Expand Up @@ -82,8 +94,7 @@ jobs:

- 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@latest
go install github.com/mitchellh/gox@latest

- run: PATH=$HOME/go/bin:$PATH make
- run: PATH=$HOME/go/bin:$PATH make test cobra_generator
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -23,7 +23,7 @@ lint:
$(info ******************** running lint tools ********************)
golangci-lint run -v

test: install_deps lint
test: install_deps
$(info ******************** running tests ********************)
richgo test -v ./...

Expand Down