From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] ci: pytest: don't attempt uploading test logs if build fails
Date: Tue, 27 May 2025 22:13:14 +0200 [thread overview]
Message-ID: <20250527201314.889055-1-a.fatoum@pengutronix.de> (raw)
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
reply other threads:[~2025-05-27 20:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250527201314.889055-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox