refactor(coverage): add coverage process in drone (#251)

* refactor(coverage): add coverage process in drone

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2017-07-20 20:18:52 -05:00 committed by GitHub
parent 460b74d8a6
commit 5da50c2aaa
2 changed files with 11 additions and 7 deletions

View File

@ -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

View File

@ -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