mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Run coverage, but push to coverall only after_success
This will ensure that we get the matrix run green before pushing results to coveralls, but also that if for some reason coveralls has a problem, this is not making our build status red. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -15,10 +15,9 @@ go test -v -failfast -covermode=atomic -coverprofile=./cov/test.out -coverpkg=./
|
||||
gocovmerge ./cov/*.out > acc.out
|
||||
rm -rf ./cov
|
||||
|
||||
# If we have an arg, assume travis run and push to coveralls. Otherwise launch browser results
|
||||
if [[ -n $1 ]]; then
|
||||
$HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci
|
||||
rm -rf ./acc.out
|
||||
else
|
||||
# Without argument, launch browser results. We are going to push to coveralls only
|
||||
# from Travis.yml and after success of the build (and result of pushing will not affect
|
||||
# build result).
|
||||
if [[ $1 == "" ]]; then
|
||||
go tool cover -html=acc.out
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user