Use coverage merge tool for goveralls
#!/usr/bin/env bash
set -eo pipefail
-coverprofiles=$(cat | sed "s/ /,/g")
-
-goveralls -v -debug -service=${CI_NAME} -coverprofile=${coverprofiles} -ignore=$(find -regextype posix-egrep -regex ".*generated_mock.*\.go|.*swagger_generated\.go|.*openapi_generated\.go" -printf "%P\n" | paste -d, -s)
+bazel run //vendor/github.com/wadey/gocovmerge:gocovmerge -- $(cat | sed "s# # ${BUILD_WORKING_DIRECTORY}/#g" | sed "s#^#${BUILD_WORKING_DIRECTORY}/#") >coverprofile.dat
+goveralls -v -debug -service=${CI_NAME} -coverprofile=coverprofile.dat -ignore=$(find -regextype posix-egrep -regex ".*generated_mock.*\.go|.*swagger_generated\.go|.*openapi_generated\.go" -printf "%P\n" | paste -d, -s)
