Skip to content

Commit f46605b

Browse files
Report summary on success, not just failure
There are cases where the summary may be useful even if errors are not detected, so this ties only the exit condition to success/failure, not the whole summary step.
1 parent f155a2d commit f46605b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/cpp-packaging.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,10 @@ jobs:
691691
run: |
692692
python scripts/gha/test_lab.py --android_model ${{ env.android_device }} --android_api ${{ env.android_api }} --ios_model ${{ env.ios_device }} --ios_version ${{ env.ios_version }} --testapp_dir testapps --code_platform cpp --key_file scripts/gha-encrypted/gcs_key_file.json
693693
- name: Summarize build and test results
694-
if: failure()
694+
if: ${{ !cancelled() }}
695695
shell: bash
696696
run: |
697697
cat testapps/summary.log
698-
exit 1
698+
if [[ "${{ job.status }}" != "success" ]]; then
699+
exit 1
700+
fi

.github/workflows/integration_tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ jobs:
160160
run: |
161161
python scripts/gha/test_lab.py --android_model ${{ github.event.inputs.android_device }} --android_api ${{ github.event.inputs.android_api }} --ios_model ${{ github.event.inputs.ios_device }} --ios_version ${{ github.event.inputs.ios_version }} --testapp_dir testapps --code_platform cpp --key_file scripts/gha-encrypted/gcs_key_file.json
162162
- name: Summarize build and test results
163-
if: failure()
163+
if: ${{ !cancelled() }}
164164
shell: bash
165165
run: |
166166
cat testapps/summary.log
167-
exit 1
167+
if [[ "${{ job.status }}" != "success" ]]; then
168+
exit 1
169+
fi

0 commit comments

Comments
 (0)