From a798b4412cc608928951d9f7a303b10ba8abc3e0 Mon Sep 17 00:00:00 2001 From: Guillaume Wallet Date: Wed, 28 Jan 2026 17:28:41 +0000 Subject: [PATCH] fix: propagate the fail-on-error settings to the step conslusion Context: The `fail-on-error` setting toggle on/off the fact that the action should fail if reporter see failed test in report. If one set `fail-on-error` to false, the expected behaviour is that the step should be considered successful. Proposal: Here is the proposal to set the conlusion accordingly - 'failure' if report sense failed tests and 'fail-on-error' is 'true' or missing (true by default) - 'success' if there are no failed test or 'fail-on-error' is set to 'false' --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 732d839..46a2b3b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -140,7 +140,7 @@ class TestReporter { } const isFailed = results.some(tr => tr.result === 'failed') - const conclusion = isFailed ? 'failure' : 'success' + const conclusion = this.failOnError && isFailed ? 'failure' : 'success' const passed = results.reduce((sum, tr) => sum + tr.passed, 0) const failed = results.reduce((sum, tr) => sum + tr.failed, 0) const skipped = results.reduce((sum, tr) => sum + tr.skipped, 0)