From b10f7d80b7480cda450a2315c62a34bd3f9c9e65 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Mar 2026 11:31:13 +0000 Subject: [PATCH] Add unified allBuildAndTestSuccessful check to CI workflows Add a new job `allBuildAndTestSuccessful` to both pull_request.yml and master.yml that depends on all other build and test jobs. This provides a single unified status check that can be used as a required check in branch protection rules to verify the entire build is green. https://claude.ai/code/session_01353Dv2D47pHrj45ExnLxmc --- .github/workflows/master.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/pull_request.yml | 23 +++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 03a5c2ae7..564592250 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -188,6 +188,34 @@ jobs: distribution: 'corretto' - name: Verify Javadoc run: ./gradlew javadoc --info --stacktrace + allBuildAndTestSuccessful: + if: always() + needs: + - buildAndTest + - update-baseline + - javadoc + - publishToMavenCentral + runs-on: ubuntu-latest + steps: + - name: Verify all jobs passed + run: | + if [ "${{ needs.buildAndTest.result }}" != "success" ]; then + echo "buildAndTest failed with result: ${{ needs.buildAndTest.result }}" + exit 1 + fi + if [ "${{ needs.update-baseline.result }}" != "success" ]; then + echo "update-baseline failed with result: ${{ needs.update-baseline.result }}" + exit 1 + fi + if [ "${{ needs.javadoc.result }}" != "success" ]; then + echo "javadoc failed with result: ${{ needs.javadoc.result }}" + exit 1 + fi + if [ "${{ needs.publishToMavenCentral.result }}" != "success" ]; then + echo "publishToMavenCentral failed with result: ${{ needs.publishToMavenCentral.result }}" + exit 1 + fi + echo "All build and test jobs passed successfully." publishToMavenCentral: needs: buildAndTest runs-on: ubuntu-latest diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7e25093ab..490616dca 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -396,3 +396,26 @@ jobs: distribution: 'corretto' - name: Verify Javadoc run: ./gradlew javadoc --info --stacktrace + allBuildAndTestSuccessful: + if: always() + needs: + - buildAndTest + - test-summary + - javadoc + runs-on: ubuntu-latest + steps: + - name: Verify all jobs passed + run: | + if [ "${{ needs.buildAndTest.result }}" != "success" ]; then + echo "buildAndTest failed with result: ${{ needs.buildAndTest.result }}" + exit 1 + fi + if [ "${{ needs.test-summary.result }}" != "success" ] && [ "${{ needs.test-summary.result }}" != "skipped" ]; then + echo "test-summary failed with result: ${{ needs.test-summary.result }}" + exit 1 + fi + if [ "${{ needs.javadoc.result }}" != "success" ]; then + echo "javadoc failed with result: ${{ needs.javadoc.result }}" + exit 1 + fi + echo "All build and test jobs passed successfully."