Skip to content

Commit f161794

Browse files
Fix unit-pr-required-check
Signed-off-by: Keval Morabia <[email protected]>
1 parent 4911f9c commit f161794

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/unit_tests.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
checks: read
2929
secrets: inherit
3030
with:
31-
match_pattern: '^DCO$'
31+
match_pattern: "^DCO$"
3232
linux:
3333
needs: [check-dco]
3434
runs-on: ubuntu-latest
@@ -119,8 +119,17 @@ jobs:
119119
- name: Run unit tests
120120
run: pip install tox && tox -e py312-partial-unit-${{ matrix.test-env }}
121121
unit-pr-required-check:
122-
if: github.event_name == 'pull_request'
122+
# Run even if some jobs are skipped
123+
if: ${{ github.event_name == 'pull_request' && always() }}
123124
needs: [linux, windows, multi-py, multi-torch, multi-transformers, partial-install]
124125
runs-on: ubuntu-latest
125126
steps:
126-
- run: echo "All PR unit test jobs completed"
127+
- name: Required unit tests did not succeed
128+
if: >-
129+
${{ needs.linux.result != 'success' ||
130+
needs.windows.result != 'success' ||
131+
needs.multi-py.result != 'success' ||
132+
needs.multi-torch.result != 'success' ||
133+
needs.multi-transformers.result != 'success' ||
134+
needs.partial-install.result != 'success' }}
135+
run: exit 1

0 commit comments

Comments
 (0)