Repository navigation
Say when no tests were found but the exit code isn't 0 - #1253
Merged
trunk-io[bot] merged 1 commit intoOct 29, 2026
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dylan/trunk-22762-define-each-cli-exit-code-in-one-place-with-its #1253 +/- ##
=====================================================================================================
- Coverage 85.52% 85.50% -0.02%
=====================================================================================================
Files 85 85
Lines 19037 19046 +9
=====================================================================================================
+ Hits 16282 16286 +4
- Misses 2755 2760 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
TylerJang27
approved these changes
Oct 26, 2026
dfrankland
force-pushed
the
dylan/trunk-19074-no-tests-exit-code
branch
from
October 27, 2026 20:42
1d03ea0 to
9be903e
Compare
dfrankland
changed the base branch from
dylan/trunk-22403-add-summary-output-file-to-upload-and-test
to
dylan/trunk-22762-define-each-cli-exit-code-in-one-place-with-its
October 27, 2026 20:43
This was referenced Oct 27, 2026
When the test reports have no tests, the summary only said "No tests were found in the provided test results", even when the run exits with the test step's non-zero code. A test step that failed before running any tests, such as a Playwright global setup that timed out, looked like an empty report rather than a failure. The summary now names the exit code and points at the step's own output:⚠️ No tests were found in the provided test results, but non zero exit code provided: 1 The test step appears to have failed without running tests -- see above for the original failure. With exit code 0, the single line is unchanged. The code is the one the CLI exits with, which is the test run's code wherever the outcome is printed: an error with its own exit code stops the summary before the outcome. The JSON summary already has `outcome: NO_TESTS_FOUND` and `exitCode`, so it doesn't change. Refs TRUNK-19074 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dfrankland
force-pushed
the
dylan/trunk-19074-no-tests-exit-code
branch
from
October 28, 2026 21:28
9be903e to
46db108
Compare
|
This pull request was merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1255.
Part of TRUNK-19074. When the test reports have no tests, the summary printed "No tests were found in the provided test results" and nothing else, even when the run then exits with the test step's non-zero code. A test step that failed before running any tests looked like an empty report, not a failure. In the ticket's example, a Playwright global setup timed out.
What changes.
outcome: "NO_TESTS_FOUND"andexitCode. The planned hiddengithub-annotationscommand will read those from the summary file and use the same wording, so the analytics-uploader action never parses the JSON itself.Which exit code. The new line uses
report.cli_exit_code(), like the neighbouring outcomes, and checks it with #1255'sExitCode::is_success(). Wherever the outcome is printed, that's the test run's code, for bothuploadandtest:render_uploadstops before the outcome.upload's exit code as the test run's.Testing.
cargo nextest run -p trunk-analytics-cli: 146 of 149 pass. The three Swift xunit tests in--test uploadfail the same way on the base branch locally ("helloworld() got no file from its declaration"), as noted on Add --summary-output-file to upload and test #1246.test'sexit 128end-to-end test now checks for the new lines.upload's zero-tests test (exit 0) checks they're absent.cargo fmt --checkpasses.cargo clippy -p trunk-analytics-cli --tests: no warnings in the changed code.🤖 Generated with Claude Code