mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ci: pytest: don't attempt uploading test logs if build fails
@ 2025-05-27 20:13 Ahmad Fatoum
  2025-06-02 11:50 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-05-27 20:13 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

If the build failed, no tests can be run and no artifacts from the
test tun will be created. We still want to upload any test logs we have
if the tests themselves failed, therefore replace always() with an
explicit check for the build step to have succeeded.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .github/workflows/test-labgrid-pytest.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/test-labgrid-pytest.yml b/.github/workflows/test-labgrid-pytest.yml
index 315868779bee..d4043de961b2 100644
--- a/.github/workflows/test-labgrid-pytest.yml
+++ b/.github/workflows/test-labgrid-pytest.yml
@@ -64,6 +64,7 @@ jobs:
       uses: actions/checkout@v4
 
     - name: Build
+      id: build
       run: |
         export KBUILD_OUTPUT=build-${{matrix.arch}}-${{matrix.defconfig}}
         export ARCH=${{matrix.arch}}
@@ -94,14 +95,14 @@ jobs:
 
     - name: Publish Test Results
       uses: EnricoMi/publish-unit-test-result-action@v2
-      if: always()
+      if: steps.build.outcome == 'success'
       with:
         check_name: "Test Results (${{matrix.defconfig}})"
         files: ./*.tests.xml
 
     - name: Publish Labgrid Log Results
       uses: actions/upload-artifact@v4
-      if: always()
+      if: steps.build.outcome == 'success'
       with:
         name: console-log-${{matrix.defconfig}}
         path: log/
-- 
2.39.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ci: pytest: don't attempt uploading test logs if build fails
  2025-05-27 20:13 [PATCH] ci: pytest: don't attempt uploading test logs if build fails Ahmad Fatoum
@ 2025-06-02 11:50 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-06-02 11:50 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Tue, 27 May 2025 22:13:14 +0200, Ahmad Fatoum wrote:
> If the build failed, no tests can be run and no artifacts from the
> test tun will be created. We still want to upload any test logs we have
> if the tests themselves failed, therefore replace always() with an
> explicit check for the build step to have succeeded.
> 
> 

Applied, thanks!

[1/1] ci: pytest: don't attempt uploading test logs if build fails
      https://git.pengutronix.de/cgit/barebox/commit/?id=4556c7c1a3f1 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-02 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-27 20:13 [PATCH] ci: pytest: don't attempt uploading test logs if build fails Ahmad Fatoum
2025-06-02 11:50 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox