Merge PR #65: Various updates to tools
- Update golangci-lint to latest version. - Remove ci-lint, no longer used. - Remove golangci-lint from tools target to prevent CI builds from downloading automatically (and unnecessarily). Developers can still run make golangci-lint to download it locally for development and testing purposes.
This commit is contained in:
committed by
Alexander Bezobchuk
parent
50aee3dd45
commit
534e56abd1
@@ -49,11 +49,6 @@ jobs:
|
|||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- go-mod-v1-{{ checksum "go.sum" }}
|
- go-mod-v1-{{ checksum "go.sum" }}
|
||||||
- run:
|
|
||||||
name: tools
|
|
||||||
command: |
|
|
||||||
make tools TOOLS_DESTDIR=/tmp/workspace/bin
|
|
||||||
cp $GOPATH/bin/runsim /tmp/workspace/bin/
|
|
||||||
- run:
|
- run:
|
||||||
name: binaries
|
name: binaries
|
||||||
command: |
|
command: |
|
||||||
@@ -64,28 +59,17 @@ jobs:
|
|||||||
key: go-mod-v1-{{ checksum "go.sum" }}
|
key: go-mod-v1-{{ checksum "go.sum" }}
|
||||||
paths:
|
paths:
|
||||||
- "/go/pkg/mod"
|
- "/go/pkg/mod"
|
||||||
|
- run:
|
||||||
|
name: tools
|
||||||
|
command: |
|
||||||
|
make tools TOOLS_DESTDIR=/tmp/workspace/bin
|
||||||
|
cp $GOPATH/bin/runsim /tmp/workspace/bin/
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: /tmp/workspace
|
root: /tmp/workspace
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- bin
|
||||||
- profiles
|
- profiles
|
||||||
|
|
||||||
lint:
|
|
||||||
<<: *linux_defaults
|
|
||||||
parallelism: 1
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /tmp/workspace
|
|
||||||
- checkout
|
|
||||||
- restore_cache:
|
|
||||||
keys:
|
|
||||||
- go-mod-v1-{{ checksum "go.sum" }}
|
|
||||||
- run:
|
|
||||||
name: Lint source
|
|
||||||
command: |
|
|
||||||
export PATH=/tmp/workspace/bin:$PATH
|
|
||||||
make ci-lint
|
|
||||||
|
|
||||||
integration_tests:
|
integration_tests:
|
||||||
<<: *linux_defaults
|
<<: *linux_defaults
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
@@ -447,9 +431,6 @@ workflows:
|
|||||||
tags:
|
tags:
|
||||||
only:
|
only:
|
||||||
- /^v.*/
|
- /^v.*/
|
||||||
- lint:
|
|
||||||
requires:
|
|
||||||
- setup_dependencies
|
|
||||||
- integration_tests:
|
- integration_tests:
|
||||||
requires:
|
requires:
|
||||||
- setup_dependencies
|
- setup_dependencies
|
||||||
|
|||||||
3
Makefile
3
Makefile
@@ -137,8 +137,7 @@ check-build: build
|
|||||||
@go test -mod=readonly -p 4 `go list ./cli_test/...` -tags=cli_test
|
@go test -mod=readonly -p 4 `go list ./cli_test/...` -tags=cli_test
|
||||||
|
|
||||||
|
|
||||||
lint: ci-lint
|
lint: golangci-lint
|
||||||
ci-lint:
|
|
||||||
golangci-lint run
|
golangci-lint run
|
||||||
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s
|
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s
|
||||||
go mod verify
|
go mod verify
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ endif
|
|||||||
|
|
||||||
GOPATH ?= $(shell $(GO) env GOPATH)
|
GOPATH ?= $(shell $(GO) env GOPATH)
|
||||||
GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com
|
GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com
|
||||||
GOLANGCI_LINT_VERSION := v1.16.0
|
GOLANGCI_LINT_VERSION := v1.17.1
|
||||||
GOLANGCI_LINT_HASHSUM := ac897cadc180bf0c1a4bf27776c410debad27205b22856b861d41d39d06509cf
|
GOLANGCI_LINT_HASHSUM := f5fa647a12f658924d9f7d6b9628d505ab118e8e049e43272de6526053ebe08d
|
||||||
|
|
||||||
###
|
###
|
||||||
# Functions
|
# Functions
|
||||||
@@ -53,7 +53,7 @@ RUNSIM = $(TOOLS_DESTDIR)/runsim
|
|||||||
all: tools
|
all: tools
|
||||||
|
|
||||||
tools: tools-stamp
|
tools: tools-stamp
|
||||||
tools-stamp: $(STATIK) $(GOIMPORTS) $(CLOG) $(GOLANGCI_LINT) $(RUNSIM)
|
tools-stamp: $(STATIK) $(GOIMPORTS) $(RUNSIM)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(GOLANGCI_LINT): $(mkfile_dir)/install-golangci-lint.sh
|
$(GOLANGCI_LINT): $(mkfile_dir)/install-golangci-lint.sh
|
||||||
@@ -63,14 +63,15 @@ $(STATIK):
|
|||||||
$(call go_install,rakyll,statik,v0.1.5)
|
$(call go_install,rakyll,statik,v0.1.5)
|
||||||
|
|
||||||
$(GOIMPORTS):
|
$(GOIMPORTS):
|
||||||
go get golang.org/x/tools/cmd/goimports@v0.0.0-20190114222345-bf090417da8b
|
go get golang.org/x/tools/cmd/goimports@v0.0.0-20190628034336-212fb13d595e
|
||||||
|
|
||||||
$(CLOG):
|
$(CLOG):
|
||||||
$(call go_install,alessio,clog,1)
|
go get github.com/cosmos/tools/cmd/clog/
|
||||||
|
|
||||||
$(RUNSIM):
|
$(RUNSIM):
|
||||||
go get github.com/cosmos/cosmos-sdk/contrib/runsim@v0.28.2-0.20190626164114-c898dac6a9fc
|
go get github.com/cosmos/tools/cmd/runsim/
|
||||||
go install -mod=readonly github.com/cosmos/cosmos-sdk/contrib/runsim
|
|
||||||
|
golangci-lint: $(GOLANGCI_LINT)
|
||||||
|
|
||||||
tools-clean:
|
tools-clean:
|
||||||
rm -f $(STATIK) $(GOIMPORTS) $(CLOG) $(GOLANGCI_LINT)
|
rm -f $(STATIK) $(GOIMPORTS) $(CLOG) $(GOLANGCI_LINT)
|
||||||
|
|||||||
Reference in New Issue
Block a user