aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-05-24 12:13:18 -0400
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-05-25 00:13:18 +0800
commitff96bda138fce51805acacfaeb92063be11cd38e (patch)
treed4ce67691f8007eb27c3184409d18271e5178d24
parent19d889daa248822ecf6404ecdc426bf2b3e4f78e (diff)
downloadgitea-ff96bda138fce51805acacfaeb92063be11cd38e.tar.gz
gitea-ff96bda138fce51805acacfaeb92063be11cd38e.zip
Only run coverage on merges/pushes to master (#1783)
-rw-r--r--.drone.yml4
-rw-r--r--Makefile4
2 files changed, 7 insertions, 1 deletions
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