[CI] Stop Windows pipeline upon a failing pytest (#10003)

This commit is contained in:
Philip Hyunsu Cho
2024-01-24 22:54:21 -08:00
committed by GitHub
parent 60ec7b8424
commit c8f5d190c6
6 changed files with 11 additions and 10 deletions

View File

@@ -32,6 +32,8 @@ Foreach-Object {
Write-Host "--- Run Python tests"
python -X faulthandler -m pytest -v -s -rxXs --fulltrace tests/python
if ($LASTEXITCODE -ne 0) { throw "Last command failed" }
Write-Host "--- Run Python tests with GPU"
python -X faulthandler -m pytest -v -s -rxXs --fulltrace -m "(not slow) and (not mgpu)"`
tests/python-gpu
if ($LASTEXITCODE -ne 0) { throw "Last command failed" }

View File

@@ -152,6 +152,7 @@ class TestGPUPredict:
@pytest.mark.parametrize("device", ["cpu", "cuda"])
@pytest.mark.skipif(**tm.no_cupy())
@pytest.mark.skipif(**tm.no_cudf())
def test_inplace_predict_device_type(self, device: str) -> None:
"""Test inplace predict with different device and data types.

View File

@@ -249,7 +249,7 @@ def test_custom_objective(
clf.fit(X, y)
@pytest.mark.skipif(**tm.no_pandas())
@pytest.mark.skipif(**tm.no_cudf())
def test_ranking_qid_df():
import cudf