Skip to content

Commit 453920f

Browse files
authored
ci: add required aggregate check (#281)
1 parent 2ee2631 commit 453920f

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
branches: [main]
77
pull_request:
88
branches: [main]
9+
merge_group:
910

1011
permissions:
1112
contents: read
@@ -156,3 +157,25 @@ jobs:
156157
# genuine `:q` and self-reports via cquit (exit 0 = fixed, 1 = regressed).
157158
- name: Reject-on-quit regression gate (#238)
158159
run: nvim --headless -u NONE -l scripts/repro_issue_238.lua
160+
161+
required:
162+
name: Required
163+
runs-on: ubuntu-latest
164+
needs:
165+
- unit-tests
166+
- integration-tests
167+
if: ${{ always() }}
168+
169+
steps:
170+
- name: Check required jobs
171+
env:
172+
UNIT_TESTS_RESULT: ${{ needs.unit-tests.result }}
173+
INTEGRATION_TESTS_RESULT: ${{ needs.integration-tests.result }}
174+
run: |
175+
echo "unit-tests: $UNIT_TESTS_RESULT"
176+
echo "integration-tests: $INTEGRATION_TESTS_RESULT"
177+
178+
if [ "$UNIT_TESTS_RESULT" != "success" ] || [ "$INTEGRATION_TESTS_RESULT" != "success" ]; then
179+
echo "One or more required jobs failed."
180+
exit 1
181+
fi

0 commit comments

Comments
 (0)