Skip to content

Commit fc13cad

Browse files
maxandersenclaude
andauthored
fix: only show test summaries on failure to reduce noise (#2435)
Changed JUnit report and Allure links steps from 'if: always()' to 'if: failure()' in both unit-test-jvm and integration-test-jvm jobs. This prevents empty "0 ran, 0 passed, 0 skipped, 0 failed" summaries from appearing when tests pass, while preserving debugging info when tests fail. Aligns with recent change to gradle add-job-summary. Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 32568d1 commit fc13cad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/step-ci-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ jobs:
145145
name: ${{ steps.shared-build.outputs.github-short-sha }}-unit-test-jvm-build-${{ matrix.os }}-${{ matrix.java-version }}
146146
path: build
147147
- name: Write out Unit Test report annotation for forked repo
148-
if: always()
148+
if: failure()
149149
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5
150150
with:
151151
report_paths: 'build/test-results/test/TEST-*.xml'
152152
annotate_only: true # forked repo cannot write to checks so just do annotations
153153
- name: Add artifact.ci links
154-
if: always()
154+
if: failure()
155155
run: |
156156
echo "View [Allure Report](https://www.artifact.ci/artifact/view/${{ github.repository }}/run/${{ github.run_id }}.${{ github.run_attempt}}/allure-report-${{ matrix.os }}) [direct link (available after first view)](https://www.artifact.ci/artifact/view/${{ github.repository }}/run/${{ github.run_id }}.${{ github.run_attempt}}/allure-report-${{ matrix.os }}/build/reports/allure-report/allureReport/index.html) for ${{ matrix.os }} build" >> $GITHUB_STEP_SUMMARY
157157
@@ -208,13 +208,13 @@ jobs:
208208
path: build
209209

210210
- name: Write out Unit Test report annotation for forked repo
211-
if: always()
211+
if: failure()
212212
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5
213213
with:
214214
report_paths: 'build/test-results/test/TEST-*.xml'
215215
annotate_only: true # forked repo cannot write to checks so just do annotations
216216
- name: Add artifact.ci links
217-
if: always()
217+
if: failure()
218218
run: |
219219
echo "View [Allure Report](https://www.artifact.ci/artifact/view/${{ github.repository }}/run/${{ github.run_id }}.${{ github.run_attempt}}/allure-report-${{ matrix.os }}) [direct link (available after first view)](https://www.artifact.ci/artifact/view/${{ github.repository }}/run/${{ github.run_id }}.${{ github.run_attempt}}/allure-report-${{ matrix.os }}/build/reports/allure-report/allureReport/index.html) for ${{ matrix.os }} build" >> $GITHUB_STEP_SUMMARY
220220

0 commit comments

Comments
 (0)