@@ -320,7 +320,7 @@ jobs:
320320GITHUB_TOKEN :${{ secrets.GITHUB_TOKEN }}
321321with :
322322repo :gotestyourself/gotestsum
323- tag :v1.8.2
323+ tag :v1.9.0
324324
325325 -uses :hashicorp/setup-terraform@v2
326326with :
@@ -340,30 +340,8 @@ jobs:
340340 else
341341 echo ::set-output name=cover::false
342342 fi
343- set +e
344- gotestsum --junitfile="gotests.xml" --jsonfile="gotestsum.json" --packages="./..." --debug -- -parallel=8 -timeout=5m -short -failfast $COVERAGE_FLAGS
345- ret=$?
346- if ((ret)); then
347- # Eternalize test timeout logs because "re-run failed" erases
348- # artifacts and gotestsum doesn't always capture it:
349- # https://github.com/gotestyourself/gotestsum/issues/292
350- # Multiple test packages could've failed, each one may or may
351- # not run into the edge case. PS. Don't summon ShellCheck here.
352- for testWithStack in $(grep 'panic: test timed out' gotestsum.json | grep -E -o '("Test":[^,}]*)'); do
353- if [ -n "$testWithStack" ] && grep -q "${testWithStack}.*PASS" gotestsum.json; then
354- echo "Conditions met for gotestsum stack trace missing bug, outputting panic trace:"
355- grep -A 999999 "${testWithStack}.*panic: test timed out" gotestsum.json
356- fi
357- done
358- fi
359- exit $ret
360343
361- -uses :actions/upload-artifact@v3
362- if :success() || failure()
363- with :
364- name :gotestsum-debug-${{ matrix.os }}.json
365- path :./gotestsum.json
366- retention-days :7
344+ gotestsum --junitfile="gotests.xml" --packages="./..." -- -parallel=8 -timeout=5m -short -failfast $COVERAGE_FLAGS
367345
368346 -uses :actions/upload-artifact@v3
369347if :success() || failure()
@@ -423,7 +401,7 @@ jobs:
423401GITHUB_TOKEN :${{ secrets.GITHUB_TOKEN }}
424402with :
425403repo :gotestyourself/gotestsum
426- tag :v1.8.2
404+ tag :v1.9.0
427405
428406 -uses :hashicorp/setup-terraform@v2
429407with :
@@ -432,30 +410,7 @@ jobs:
432410
433411 -name :Test with PostgreSQL Database
434412run :|
435- set +e
436413 make test-postgres
437- ret=$?
438- if ((ret)); then
439- # Eternalize test timeout logs because "re-run failed" erases
440- # artifacts and gotestsum doesn't always capture it:
441- # https://github.com/gotestyourself/gotestsum/issues/292
442- # Multiple test packages could've failed, each one may or may
443- # not run into the edge case. PS. Don't summon ShellCheck here.
444- for testWithStack in $(grep 'panic: test timed out' gotestsum.json | grep -E -o '("Test":[^,}]*)'); do
445- if [ -n "$testWithStack" ] && grep -q "${testWithStack}.*PASS" gotestsum.json; then
446- echo "Conditions met for gotestsum stack trace missing bug, outputting panic trace:"
447- grep -A 999999 "${testWithStack}.*panic: test timed out" gotestsum.json
448- fi
449- done
450- fi
451- exit $ret
452-
453- -uses :actions/upload-artifact@v3
454- if :success() || failure()
455- with :
456- name :gotestsum-debug-postgres.json
457- path :./gotestsum.json
458- retention-days :7
459414
460415 -uses :actions/upload-artifact@v3
461416if :success() || failure()