Skip to content

Commit

Permalink
chore(ci): use golangci-lint-action (#1477)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
  • Loading branch information
mmorel-35 authored and umarcor committed Nov 15, 2021
1 parent ba6c848 commit 65d652b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,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 @@ -41,16 +55,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 @@ -83,8 +95,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
Original file line number Diff line number Diff line change
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

0 comments on commit 65d652b

Please sign in to comment.