Skip to content

Commit ff2c55e

Browse files
authored
chore(ci): use golangci-lint-action (#1477)
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 1beb476 commit ff2c55e

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/workflows/Test.yml renamed to .github/workflows/test.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ env:
99

1010
jobs:
1111

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

1327
test-unix:
1428
strategy:
@@ -40,16 +54,14 @@ jobs:
4054

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

5466
test-win:
5567
name: MINGW64
@@ -82,8 +94,7 @@ jobs:
8294

8395
- run: |
8496
export GOBIN=$HOME/go/bin
85-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest
8697
go install github.com/kyoh86/richgo@latest
8798
go install github.com/mitchellh/gox@latest
8899
89-
- run: PATH=$HOME/go/bin:$PATH make
100+
- 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)