circle/makefile upgraaade

This commit is contained in:
rigelrozanski
2018-05-02 23:07:05 -04:00
parent 9ccee0770f
commit e970dce841
2 changed files with 47 additions and 13 deletions
+9 -13
View File
@@ -1,13 +1,14 @@
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
PACKAGES_NOCLITEST=$(shell go list ./... | grep -v '/vendor/' | grep -v github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test)
COMMIT_HASH := $(shell git rev-parse --short HEAD)
BUILD_FLAGS = -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=${COMMIT_HASH}"
all: check_tools get_vendor_deps build build_examples install install_examples test_nocli
all: check_tools get_vendor_deps install install_examples test_lint test
########################################
### CI
ci: get_tools get_vendor_deps install test_cover
ci: get_tools get_vendor_deps install test_cover test_lint test
########################################
### Build
@@ -83,18 +84,13 @@ godocs:
########################################
### Testing
test: test_unit # test_cli
test: test_unit test_cli
test_nocli:
go test `go list ./... | grep -v github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test`
# Must be run in each package seperately for the visualization
# Added here for easy reference
# coverage:
# go test -coverprofile=c.out && go tool cover -html=c.out
test_cli:
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test`
test_unit:
@go test $(PACKAGES)
@go test $(PACKAGES_NOCLITEST)
test_cover:
@bash tests/test_cover.sh
@@ -103,7 +99,7 @@ test_lint:
gometalinter --disable-all --enable='golint' --vendor ./...
benchmark:
@go test -bench=. $(PACKAGES)
@go test -bench=. $(PACKAGES_NOCLITEST)
########################################
@@ -133,4 +129,4 @@ devdoc_update:
# To avoid unintended conflicts with file names, always add to .PHONY
# unless there is a reason not to.
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
.PHONY: build build_examples install install_examples dist check_tools get_tools get_vendor_deps draw_deps test test_nocli test_unit test_cover test_lint benchmark devdoc_init devdoc devdoc_save devdoc_update
.PHONY: build build_examples install install_examples dist check_tools get_tools get_vendor_deps draw_deps test test_cli test_unit test_cover test_lint benchmark devdoc_init devdoc devdoc_save devdoc_update