Skip to content

Commit f4f21ec

Browse files
[build-and-test] Add job that runs after successful completion of the build and test matrix (#1372)
Summary: Adds a job after all of the build-and-test matrix finishes. This way we can require this jobs completion on all PRs. Type of change: /kind cleanup Test Plan: Testing with build-and-test on this PR. Signed-off-by: James Bartlett <jamesbartlett@pixielabs.ai>
1 parent 25e065d commit f4f21ec

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,24 @@ jobs:
158158
bb_url="$(cat bazel_stderr | grep -Po "(?<=Streaming build results to: ).*" | tail -n 1)"
159159
echo "${bb_url}"
160160
shell: bash
161+
build-and-test-status:
162+
if: always()
163+
needs: [build-and-test, clang-tidy, generate-matrix]
164+
runs-on: ubuntu-latest
165+
steps:
166+
- if: needs.build-and-test.result == 'success' && needs.clang-tidy.result == 'success'
167+
run: echo "Build and Test complete ✓"
168+
- if: >
169+
needs.generate-matrix.result == 'success' && needs.clang-tidy.result == 'success'
170+
&& needs.build-and-test.result == 'skipped'
171+
run: echo "Build and Test skipped no matrix configs generated ✓"
172+
# yamllint disable rule:indentation
173+
- if: >
174+
!(needs.build-and-test.result == 'success' && needs.clang-tidy.result == 'success') &&
175+
!(needs.generate-matrix.result == 'success' &&
176+
needs.clang-tidy.result == 'success' &&
177+
needs.build-and-test.result == 'skipped')
178+
# yamllint enable rule:indentation
179+
run: |
180+
echo "Build and Test failed"
181+
exit 1

0 commit comments

Comments
 (0)