diff --git a/Makefile b/Makefile index 5a50069..287a59e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,10 @@ LOCAL_VERSION?=$(shell semver-gen generate -l -c config-release.yaml | sed -e 's|SEMVER ||g') +CI_RUN?=false +ADDITIONAL_BUILD_FLAGS="" + +ifeq ($(CI_RUN), true) + ADDITIONAL_BUILD_FLAGS="-test.short" +endif all: build @@ -9,7 +15,7 @@ run: build @./semver-gen test: - @go test ./... -v -race -cover -coverprofile=coverage.out + @go test ./... $(ADDITIONAL_BUILD_FLAGS) -v -race -cover -coverprofile=coverage.out update: - @go get -u ./... \ No newline at end of file + @go get -u ./... diff --git a/cmd/github_test.go b/cmd/github_test.go index 21babbd..823e1e6 100644 --- a/cmd/github_test.go +++ b/cmd/github_test.go @@ -26,6 +26,9 @@ func Test_checkLatestRelease(t *testing.T) { } func Test_updatePackage(t *testing.T) { + if testing.Short() { + t.Skip("Skipping test in short / CI mode") + } tests := []struct { name string want bool