ci: Fix 'Run Tests' not always running (#26685)
Follow up to: - https://github.com/zed-industries/zed/pull/26551 We need the "Tests Pass" step to run `if: always()`. Turns out when it's 'skipped', it counts as 'passing' with respect to required status checks. Release Notes: - N/A
This commit is contained in:
parent
8361c32a34
commit
f7927d3fa4
1 changed files with 21 additions and 15 deletions
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
|
@ -432,22 +432,28 @@ jobs:
|
||||||
- macos_tests
|
- macos_tests
|
||||||
- windows_clippy
|
- windows_clippy
|
||||||
- windows_tests
|
- windows_tests
|
||||||
if: |
|
if: always()
|
||||||
always() && (
|
|
||||||
needs.style.result == 'success'
|
|
||||||
&& (
|
|
||||||
needs.job_spec.outputs.run_tests == 'false'
|
|
||||||
|| (needs.macos_tests.result == 'success'
|
|
||||||
&& needs.linux_tests.result == 'success'
|
|
||||||
&& needs.windows_tests.result == 'success'
|
|
||||||
&& needs.windows_clippy.result == 'success'
|
|
||||||
&& needs.build_remote_server.result == 'success'
|
|
||||||
&& needs.migration_checks.result == 'success')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
steps:
|
steps:
|
||||||
- name: All tests passed
|
- name: Check all tests passed
|
||||||
run: echo "All tests passed successfully!"
|
run: |
|
||||||
|
# Check dependent jobs...
|
||||||
|
RET_CODE=0
|
||||||
|
# Always check style
|
||||||
|
[[ "${{ needs.style.result }}" != 'success' ]] && { RET_CODE=1; echo "style tests failed"; }
|
||||||
|
|
||||||
|
# Only check test jobs if they were supposed to run
|
||||||
|
if [[ "${{ needs.job_spec.outputs.run_tests }}" == "true" ]]; then
|
||||||
|
[[ "${{ needs.macos_tests.result }}" != 'success' ]] && { RET_CODE=1; echo "macOS tests failed"; }
|
||||||
|
[[ "${{ needs.linux_tests.result }}" != 'success' ]] && { RET_CODE=1; echo "Linux tests failed"; }
|
||||||
|
[[ "${{ needs.windows_tests.result }}" != 'success' ]] && { RET_CODE=1; echo "Windows tests failed"; }
|
||||||
|
[[ "${{ needs.windows_clippy.result }}" != 'success' ]] && { RET_CODE=1; echo "Windows clippy failed"; }
|
||||||
|
[[ "${{ needs.migration_checks.result }}" != 'success' ]] && { RET_CODE=1; echo "Migration checks failed"; }
|
||||||
|
[[ "${{ needs.build_remote_server.result }}" != 'success' ]] && { RET_CODE=1; echo "Remote server build failed"; }
|
||||||
|
fi
|
||||||
|
if [[ "$RET_CODE" -eq 0 ]]; then
|
||||||
|
echo "All tests passed successfully!"
|
||||||
|
fi
|
||||||
|
exit $RET_CODE
|
||||||
|
|
||||||
bundle-mac:
|
bundle-mac:
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue