Skip to content

Commit 08e7b18

Browse files
mmorel-35umarcor
authored andcommitted
chore(ci): use golangci-lint-action (spf13#1477)
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 0749cf8 commit 08e7b18

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/workflows/Test.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ env:
1010

1111
jobs:
1212

13+
golangci-lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
17+
- uses: actions/setup-go@v2
18+
with:
19+
go-version: '1.17'
20+
21+
- uses: actions/checkout@v2
22+
23+
- uses: golangci/golangci-lint-action@v2
24+
with:
25+
version: latest
26+
args: --verbose
1327

1428
test-unix:
1529
strategy:
@@ -41,16 +55,14 @@ jobs:
4155

4256
- run: |
4357
export GOBIN=$HOME/go/bin
44-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest
4558
case "${{ matrix.go }}" in
4659
16|17) _version='@latest';;
4760
*) _version='';;
4861
esac
4962
go install github.com/kyoh86/richgo"${_version}"
5063
go install github.com/mitchellh/gox"${_version}"
5164
52-
- run: PATH=$HOME/go/bin/:$PATH make
53-
65+
- run: PATH=$HOME/go/bin/:$PATH make test cobra_generator
5466

5567
test-win:
5668
name: MINGW64
@@ -83,8 +95,7 @@ jobs:
8395

8496
- run: |
8597
export GOBIN=$HOME/go/bin
86-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest
8798
go install github.com/kyoh86/richgo@latest
8899
go install github.com/mitchellh/gox@latest
89100
90-
- run: PATH=$HOME/go/bin:$PATH make
101+
- run: PATH=$HOME/go/bin:$PATH make test cobra_generator

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ lint:
2323
$(info ******************** running lint tools ********************)
2424
golangci-lint run -v
2525

26-
test: install_deps lint
26+
test: install_deps
2727
$(info ******************** running tests ********************)
2828
richgo test -v ./...
2929

0 commit comments

Comments
 (0)