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

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


The following commit(s) were added to refs/heads/main by this push:
     new c223abadf0 fix(ci): ensure test results are displayed on error or 
timeout (#2314)
c223abadf0 is described below

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

    fix(ci): ensure test results are displayed on error or timeout (#2314)
    
    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 d32a2f8b1d..f296871bd4 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