Merge pull request #881 from cosmos/cwgoes/circleci-golint
Add Golint to CircleCI
This commit is contained in:
commit
0dd9634546
|
@ -27,6 +27,11 @@ jobs:
|
|||
command: |
|
||||
export PATH="$GOBIN:$PATH"
|
||||
make get_vendor_deps
|
||||
- run:
|
||||
name: linter
|
||||
command: |
|
||||
export PATH="$GOBIN:$PATH"
|
||||
go get -u github.com/tendermint/lint/golint
|
||||
- run:
|
||||
name: binaries
|
||||
command: |
|
||||
|
@ -46,6 +51,24 @@ jobs:
|
|||
paths:
|
||||
- /go/src/github.com/cosmos/cosmos-sdk
|
||||
|
||||
lint:
|
||||
<<: *defaults
|
||||
parallelism: 4
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace
|
||||
- restore_cache:
|
||||
key: v1-pkg-cache
|
||||
- restore_cache:
|
||||
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- run:
|
||||
name: Lint source
|
||||
command: |
|
||||
export PATH="$GOBIN:$PATH"
|
||||
for pkg in $(go list github.com/cosmos/cosmos-sdk/... | grep -v /vendor/); do
|
||||
test -z "$(golint $pkg | tee /dev/stderr)"
|
||||
done
|
||||
|
||||
test_cover:
|
||||
<<: *defaults
|
||||
parallelism: 4
|
||||
|
@ -96,10 +119,12 @@ workflows:
|
|||
test-suite:
|
||||
jobs:
|
||||
- setup_dependencies
|
||||
- lint:
|
||||
requires:
|
||||
- setup_dependencies
|
||||
- test_cover:
|
||||
requires:
|
||||
- setup_dependencies
|
||||
- upload_coverage:
|
||||
requires:
|
||||
- test_cover
|
||||
|
||||
|
|
Loading…
Reference in New Issue