File tree 1 file changed +20
-2
lines changed
1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -338,8 +338,16 @@ jobs:
338
338
else
339
339
echo ::set-output name=cover::false
340
340
fi
341
- set -x
342
341
gotestsum --junitfile="gotests.xml" --jsonfile="gotestsum.json" --packages="./..." --debug -- -parallel=8 -timeout=3m -short -failfast $COVERAGE_FLAGS
342
+ ret=$?
343
+ if ((ret)); then
344
+ # Eternalize test timeout logs because "re-run failed" erases
345
+ # artifacts and gotestsum doesn't always capture it:
346
+ # https://github.com/gotestyourself/gotestsum/issues/292
347
+ echo "Checking gotestsum.json for panic trace:"
348
+ grep -A 999999 'panic: test timed out' gotestsum.json
349
+ fi
350
+ exit $ret
343
351
344
352
- uses : actions/upload-artifact@v3
345
353
if : success() || failure()
@@ -407,7 +415,17 @@ jobs:
407
415
terraform_wrapper : false
408
416
409
417
- name : Test with PostgreSQL Database
410
- run : make test-postgres
418
+ run : |
419
+ make test-postgres
420
+ ret=$?
421
+ if ((ret)); then
422
+ # Eternalize test timeout logs because "re-run failed" erases
423
+ # artifacts and gotestsum doesn't always capture it:
424
+ # https://github.com/gotestyourself/gotestsum/issues/292
425
+ echo "Checking gotestsum.json for panic trace:"
426
+ grep -A 999999 'panic: test timed out' gotestsum.json
427
+ fi
428
+ exit $ret
411
429
412
430
- uses : actions/upload-artifact@v3
413
431
if : success() || failure()
You can’t perform that action at this time.
0 commit comments