File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,3 +128,33 @@ jobs:
128128 shell_check_enabled : false
129129 yamllint_check_enabled : false
130130 python_lint_check_enabled : false
131+
132+ build-verdict :
133+ name : Build Verdict
134+ needs :
135+ - tests_with_docker_embedded_swift
136+ - tests_with_docker
137+ - tests_without_docker
138+ - tests_macos
139+ - build_tests_ios
140+ - soundness
141+ - proposal_validation
142+ - soundness-docs
143+ runs-on : ubuntu-latest
144+ if : always() # Runs even if previous jobs fail so it can evaluate them
145+ steps :
146+ - name : Install required tools
147+ run : |
148+ sudo apt-get update
149+ sudo apt-get install -y --no-install-recommends coreutils jq
150+ - name : Check upstream job statuses
151+ env :
152+ NEEDS_JSON : ${{ toJSON(needs) }}
153+ run : |
154+ failed=$(printf '%s' "$NEEDS_JSON" | jq -r 'to_entries | map(select(.value.result != "success")) | .[] | "\(.key): \(.value.result)"')
155+ if [ -n "$failed" ]; then
156+ echo "The following required jobs did not succeed:"
157+ printf '%s\n' "$failed"
158+ exit 1
159+ fi
160+ echo "All required jobs passed successfully!"
You can’t perform that action at this time.
0 commit comments