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:
parent
460b74d8a6
commit
5da50c2aaa
13
.drone.yml
13
.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
|
||||
|
|
5
Makefile
5
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
|
||||
|
|
Loading…
Reference in New Issue