From 8319caf63f0f5fd38b2439c7379823d656fb404e Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Sat, 23 Mar 2019 20:51:38 +0800 Subject: [PATCH] Makefile: Add target build kata-containers's ci will re-build and re-install golangci-lint every time it did the staic check. So run test of golangci-lint with build will make it slow. Add target build to make golangci-lint just build but not test. Fixes: #458 Signed-off-by: Hui Zhu --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ca35ea7a..29aca2b6 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ -test: - go build -o golangci-lint ./cmd/golangci-lint +test: build GL_TEST_RUN=1 ./golangci-lint run -v GL_TEST_RUN=1 ./golangci-lint run --fast --no-config -v --skip-dirs 'test/testdata_etc,pkg/golinters/goanalysis/(checker|passes)' GL_TEST_RUN=1 ./golangci-lint run --no-config -v --skip-dirs 'test/testdata_etc,pkg/golinters/goanalysis/(checker|passes)' GL_TEST_RUN=1 go test -v ./... +build: + go build -o golangci-lint ./cmd/golangci-lint + test_race: go build -race -o golangci-lint ./cmd/golangci-lint GL_TEST_RUN=1 ./golangci-lint run -v --deadline=5m