Skip to content

Commit 2b076c6

Browse files
committed
improved status check
1 parent 6003e7a commit 2b076c6

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

.github/workflows/gapic-generator-tests.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,27 @@ jobs:
226226
runs-on: ubuntu-latest
227227
steps:
228228
- name: Check all jobs for failure
229-
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
230-
run: exit 1
229+
run: |
230+
echo "check_changes result: ${{ needs.check_changes.result }}"
231+
echo "python_config result: ${{ needs.python_config.result }}"
232+
echo "showcase-unit result: ${{ needs.showcase-unit.result }}"
233+
echo "showcase-mypy result: ${{ needs.showcase-mypy.result }}"
234+
echo "goldens result: ${{ needs.goldens.result }}"
235+
echo "goldens-prerelease result: ${{ needs.goldens-prerelease.result }}"
236+
echo "fragment-snippet result: ${{ needs.fragment-snippet.result }}"
237+
echo "integration result: ${{ needs.integration.result }}"
238+
239+
# Fail if any of the dependencies failed or were cancelled
240+
if [ "${{ needs.check_changes.result }}" = "failure" ] || [ "${{ needs.check_changes.result }}" = "cancelled" ] || \
241+
[ "${{ needs.python_config.result }}" = "failure" ] || [ "${{ needs.python_config.result }}" = "cancelled" ] || \
242+
[ "${{ needs.showcase-unit.result }}" = "failure" ] || [ "${{ needs.showcase-unit.result }}" = "cancelled" ] || \
243+
[ "${{ needs.showcase-mypy.result }}" = "failure" ] || [ "${{ needs.showcase-mypy.result }}" = "cancelled" ] || \
244+
[ "${{ needs.goldens.result }}" = "failure" ] || [ "${{ needs.goldens.result }}" = "cancelled" ] || \
245+
[ "${{ needs.goldens-prerelease.result }}" = "failure" ] || [ "${{ needs.goldens-prerelease.result }}" = "cancelled" ] || \
246+
[ "${{ needs.fragment-snippet.result }}" = "failure" ] || [ "${{ needs.fragment-snippet.result }}" = "cancelled" ] || \
247+
[ "${{ needs.integration.result }}" = "failure" ] || [ "${{ needs.integration.result }}" = "cancelled" ]; then
248+
echo "Error: One or more required jobs failed or were cancelled."
249+
exit 1
250+
fi
251+
echo "All checks passed or were successfully skipped."
231252

0 commit comments

Comments
 (0)