From de7b85ef175938a7ed3aad7a6554774f6acae1b0 Mon Sep 17 00:00:00 2001 From: David Allison <62114487+david-allison@users.noreply.github.com> Date: Tue, 23 Apr 2024 14:00:00 +0100 Subject: [PATCH] build(ci): upload logs on timeout A timeout can cancel tests, which blocks log uploads Issue 16253 https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif https://docs.github.com/en/actions/learn-github-actions/expressions#cancelled --- .github/workflows/tests_unit.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests_unit.yml b/.github/workflows/tests_unit.yml index 72ac34e1a9..8cbb3e7f6d 100644 --- a/.github/workflows/tests_unit.yml +++ b/.github/workflows/tests_unit.yml @@ -92,7 +92,9 @@ jobs: arguments: jacocoUnitTestReport --daemon - name: Store Logcat as Artifact - if: failure() + # cancelled() handles test timeouts + # remove when test timeouts cause a failure() + if: failure() || cancelled() uses: actions/upload-artifact@v3 with: name: logcat-${{ matrix.name }}