download golangci-lint binary with test script (#5934)

* remove golangci-lint installation from test script

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* download golint in test script

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* use makefile to download golangci-lint

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* use official method to install linter

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
This commit is contained in:
Anand Kumar Singh
2022-07-18 20:39:14 +05:30
committed by GitHub
parent 4152c93517
commit 7437483d4b

View File

@@ -51,7 +51,8 @@ GINKGO_FLAGS_ALL = $(GINKGO_TEST_ARGS) --randomize-all --slow-spec-threshold=$(S
GINKGO_FLAGS_SERIAL = $(GINKGO_FLAGS_ALL) -nodes=1
# Flags for tests that may be run in parallel
GINKGO_FLAGS=$(GINKGO_FLAGS_ALL) -nodes=$(TEST_EXEC_NODES)
# GolangCi version for unit-validate test
GOLANGCI_LINT_VERSION=1.37.0
RUN_GINKGO = go run -mod=vendor github.com/onsi/ginkgo/v2/ginkgo
@@ -111,8 +112,7 @@ clean:
.PHONY: goget-tools
goget-tools:
mkdir -p $(shell go env GOPATH)/bin
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.37.0
(curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/v$(GOLANGCI_LINT_VERSION)/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v$(GOLANGCI_LINT_VERSION)) || go install -mod=readonly github.com/golangci/golangci-lint/cmd/golangci-lint@v$(GOLANGCI_LINT_VERSION)
.PHONY: goget-ginkgo
goget-ginkgo: