* [PATCH] ci: pytest: don't attempt uploading test logs if build fails
@ 2025-05-27 20:13 Ahmad Fatoum
0 siblings, 0 replies; only message 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] only message in thread
only message in thread, other threads:[~2025-05-27 20:13 UTC | newest]
Thread overview: (only message) (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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox