From 5da50c2aaa5e58c82b142e9bc4a41e3f03726cd7 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Thu, 20 Jul 2017 20:18:52 -0500 Subject: [PATCH] refactor(coverage): add coverage process in drone (#251) * refactor(coverage): add coverage process in drone * update Signed-off-by: Bo-Yi Wu --- .drone.yml | 13 +++++++++++-- Makefile | 5 ----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index dcf21ac..8d19515 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,8 +22,17 @@ pipeline: - make misspell-check - make fmt-check - coverage all - # send coverage report - - make coverage + + codecov: + image: robertstettner/drone-codecov + secrets: + - source: codecov_token + target: plugin_token + files: + - .cover/coverage.txt + when: + event: [ push, pull_request ] + status: [ success ] release: image: appleboy/golang-testing diff --git a/Makefile b/Makefile index 838f022..9d8974c 100644 --- a/Makefile +++ b/Makefile @@ -173,11 +173,6 @@ endif docker tag $(DEPLOY_ACCOUNT)/$(EXECUTABLE):latest $(DEPLOY_ACCOUNT)/$(EXECUTABLE):$(tag) docker push $(DEPLOY_ACCOUNT)/$(EXECUTABLE):$(tag) -coverage: - curl -s https://codecov.io/bash > .codecov && \ - chmod +x .codecov && \ - ./.codecov -f .cover/coverage.txt - clean: go clean -x -i ./... find . -name coverage.txt -delete