From c201efbc0992cc196f903307ddb6cee23d7cff3e Mon Sep 17 00:00:00 2001 From: Kyle Dixler Date: Tue, 5 Dec 2023 11:01:57 -0800 Subject: [PATCH] Handle coverage only being on retried tests. https://github.com/gotestyourself/gotestsum/issues/274 --- .github/workflows/on-pr.yml | 3 +-- scripts/go-test.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index 56b16424f6fb..a37bd5d95a78 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -105,8 +105,7 @@ jobs: && 'macos-latest windows-latest' || '' }} - # We'll only upload coverage artifacts with the periodic-coverage cron workflow. - enable-coverage: false + enable-coverage: true secrets: inherit prepare-release: diff --git a/scripts/go-test.py b/scripts/go-test.py index 993f8162ec2e..0b64b71a4f28 100755 --- a/scripts/go-test.py +++ b/scripts/go-test.py @@ -89,7 +89,7 @@ def heartbeat(): os.mkdir(str(test_results_dir)) json_file = str(test_results_dir.joinpath(f'{test_run}.json')) - args = ['gotestsum', '--jsonfile', json_file, '--rerun-fails=1', '--packages', pkgs, '--'] + \ + args = ['gotestsum', '--jsonfile', json_file, '--rerun-fails=1', '--rerun-fails-run-root-test', '--packages', pkgs, '--'] + \ opts else: args = ['go', 'test'] + args