Add Golint to CircleCI

This commit is contained in:
Christopher Goes 2018-04-19 14:30:14 +02:00
parent d28efaac27
commit 4662674580
No known key found for this signature in database
GPG Key ID: E828D98232D328D3
1 changed files with 26 additions and 1 deletions

View File

@ -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