From ff96bda138fce51805acacfaeb92063be11cd38e Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Wed, 24 May 2017 12:13:18 -0400 Subject: [PATCH] Only run coverage on merges/pushes to master (#1783) --- .drone.yml | 4 +++- Makefile | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 62db99082c..4ee3880897 100644 --- a/.drone.yml +++ b/.drone.yml @@ -73,8 +73,10 @@ pipeline: coverage: image: plugins/coverage server: https://coverage.gitea.io + commands: + - make test-coverage when: - event: [ push, tag, pull_request ] + event: [ push, tag ] docker: image: plugins/docker diff --git a/Makefile b/Makefile index f2477f7c4c..d39e51830d 100644 --- a/Makefile +++ b/Makefile @@ -80,6 +80,10 @@ integrations: build .PHONY: test test: + go test $(PACKAGES) + +.PHONY: test-coverage +test-coverage: for PKG in $(PACKAGES); do go test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done; .PHONY: test-vendor