Skip to content

Commit

Permalink
Handle coverage only being on retried tests.
Browse files Browse the repository at this point in the history
gotestyourself/gotestsum#274

Updates gotestsum to v1.11.0
  • Loading branch information
Kyle Dixler committed Dec 7, 2023
1 parent 7f19d7e commit 2847df4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
with:
repo: gotestyourself/gotestsum
tag: v1.8.1
tag: v1.11.0
cache: enable
- name: Install goteststats
uses: jaxxstorm/action-install-gh-release@v1.7.1
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@ jobs:
find test-results -mindepth 1 -name '*.json' -mtime +7 -delete
test-collect-coverage:
needs: [unit-test, integration-test, acceptance-test]
if: ${{ inputs.enable-coverage }}
#if: ${{ inputs.enable-coverage }}
# TODO revert this
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Retrieve code coverage statuses
Expand Down
25 changes: 1 addition & 24 deletions .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,30 +83,7 @@ jobs:
ref: ${{ github.ref }}
version: ${{ needs.info.outputs.version }}
lint: true
build-all-targets: ${{ contains(github.event.pull_request.labels.*.name, 'ci/test') }}
# codegen tests take quite a while to run.
# Run them only if ci/test is set,
# or if one of the codegen files changed.
test-codegen: >- # No newlines or trailing newline.
${{
contains(github.event.pull_request.labels.*.name, 'ci/test') ||
(needs.inspect.outputs.test-codegen == 'true')
}}
test-version-sets: >- # No newlines or trailing newline.
${{
contains(github.event.pull_request.labels.*.name, 'ci/test')
&& 'minimum current'
|| 'current'
}}
integration-test-platforms: ubuntu-latest
acceptance-test-platforms: >- # No newlines or trailing newline.
${{
contains(github.event.pull_request.labels.*.name, 'ci/test')
&& '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:
Expand Down
2 changes: 1 addition & 1 deletion scripts/go-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2847df4

Please sign in to comment.