Skip to content

Commit 913f7c7

Browse files
yf225kwen2501
andauthored
[CI] Fail the distributed CI job if any unit test fails (#1125)
Co-authored-by: Ke Wen <kw2501@meta.com>
1 parent 51580b4 commit 913f7c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ jobs:
161161
# --timeout: max allowed time for each test
162162
TEST_PATH=$([[ "${{ contains(matrix.alias, 'distributed') }}" == "true" ]] && echo "test/test_examples_dist.py" || echo ".")
163163
EXTRA_FLAGS=$([[ "${{ contains(matrix.alias, 'distributed') }}" == "true" ]] && echo "-rs" || echo "--ignore=test/test_examples_dist.py")
164-
# For distributed tests, fail if any test is skipped
165-
SKIP_CHECK=$([[ "${{ contains(matrix.alias, 'distributed') }}" == "true" ]] && echo "! grep -q SKIPPED" || echo "cat")
164+
# For distributed tests, fail if any test is skipped, failed, or has an error
165+
SKIP_CHECK=$([[ "${{ contains(matrix.alias, 'distributed') }}" == "true" ]] && echo "! grep -qE '(SKIPPED|FAILED|ERROR)'" || echo "cat")
166166
pytest -rf --timeout=60 $EXTRA_FLAGS $TEST_PATH | tee >(eval $SKIP_CHECK)
167167
168168
test-notebooks:

0 commit comments

Comments
 (0)