9528a3bf1f
* Rerun go-test and go-test-32bits tests up to 3 times before failing * do not run rerun fail report in oss * set back rerun fail report but print to stdin instead of comment
21 lines
433 B
Bash
Executable file
21 lines
433 B
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Add a comment on the github PR if there were any rerun tests.
|
|
#
|
|
set -eu -o pipefail
|
|
|
|
report_filename="${1?report filename is required}"
|
|
if [ ! -s "$report_filename" ]; then
|
|
echo "gotestsum rerun report file is empty or missing"
|
|
exit 0
|
|
fi
|
|
|
|
function report {
|
|
echo ":repeat: gotestsum re-ran some tests in $CIRCLE_BUILD_URL"
|
|
echo
|
|
echo '```'
|
|
cat "$report_filename"
|
|
echo '```'
|
|
}
|
|
|
|
report |