We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 115d07e + 8704898 commit 70e8400Copy full SHA for 70e8400
hack/test-go.sh
@@ -14,7 +14,9 @@ if [ -n "${JUNIT_REPORT-}" ]; then
14
_V="-v"
15
for i do [ "$i" != "-v" ] || _V=""; done
16
RETCODE=0
17
- go test $_V -json "$@" >"$GO_TEST_JSON" || RETCODE=$?
+ go test $_V -coverprofile=coverage.out "-outputdir=$ARTIFACT_DIR" -json "$@" >"$GO_TEST_JSON" || RETCODE=$?
18
+
19
+ go tool cover "-html=$ARTIFACT_DIR/coverage.out" "-o=$ARTIFACT_DIR/coverage.html"
20
21
! grep "^[^{]" "$GO_TEST_JSON" || exit $RETCODE
22
go run "$(dirname "$0")/junitxml/junitxml.go" <"$GO_TEST_JSON" >"$REPORT_FILE"
0 commit comments