This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.4.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.4.x by this push:
     new 6d5270241b fix(ci): ensure test results are displayed on error or 
timeout (#2315)
6d5270241b is described below

commit 6d5270241b43fb2716f8c761e883bbc1396f24ea
Author: JB Onofré <[email protected]>
AuthorDate: Sat Mar 14 10:50:56 2026 +0100

    fix(ci): ensure test results are displayed on error or timeout (#2315)
    
    Use `always()` instead of `!cancelled()` so the upload and publish
    steps run even when the job is cancelled due to a timeout.  Add a
    step-level timeout to the Maven test run so a timeout stops the step
    without cancelling the entire job, giving the reporting steps a chance
    to execute.
---
 .github/workflows/ci.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 581f7b8aac..59e62bbab3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -78,14 +78,15 @@ jobs:
           key: maven-local-repo-${{ github.run_id }}
       - name: Test
         run: mvn -B -e install -Ptest
+        timeout-minutes: 180
       - name: Upload Test Results
-        if: (!cancelled())
+        if: always()
         uses: actions/upload-artifact@v4
         with:
           name: test-results
           path: '**/target/surefire-reports/*.xml'
       - name: Publish Test Results
-        if: (!cancelled())
+        if: always()
         uses: EnricoMi/publish-unit-test-result-action@v2
         with:
           large_files: true

Reply via email to