From 03da2944d7403a2ac16e87c78b39cc842d97c5d8 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 4 May 2024 18:16:20 +0200 Subject: [PATCH] Add `windows-latest` to CI Tests (#11233) Signed-off-by: Glenn Jocher Co-authored-by: Burhan <62214284+Burhan-Q@users.noreply.github.com> Co-authored-by: UltralyticsAssistant --- .github/workflows/ci.yaml | 2 +- tests/test_python.py | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ddd289bc..7ee9686b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -174,7 +174,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-14] + os: [ubuntu-latest, windows-latest, macos-14] python-version: ["3.11"] torch: [latest] include: diff --git a/tests/test_python.py b/tests/test_python.py index b4ed7172..b084385b 100644 --- a/tests/test_python.py +++ b/tests/test_python.py @@ -235,38 +235,39 @@ def test_export_coreml(): YOLO(MODEL).export(format="coreml", nms=True) -def test_export_tflite(enabled=False): +@pytest.mark.skipif(not LINUX, reason="Test disabled as TF suffers from install conflicts on Windows and macOS") +def test_export_tflite(): """ Test exporting the YOLO model to TFLite format. Note TF suffers from install conflicts on Windows and macOS. """ - if enabled and LINUX: - model = YOLO(MODEL) - f = model.export(format="tflite") - YOLO(f)(SOURCE) + model = YOLO(MODEL) + f = model.export(format="tflite") + YOLO(f)(SOURCE) -def test_export_pb(enabled=False): +@pytest.mark.skipif(True, reason="Test disabled") +@pytest.mark.skipif(not LINUX, reason="TF suffers from install conflicts on Windows and macOS") +def test_export_pb(): """ Test exporting the YOLO model to *.pb format. Note TF suffers from install conflicts on Windows and macOS. """ - if enabled and LINUX: - model = YOLO(MODEL) - f = model.export(format="pb") - YOLO(f)(SOURCE) + model = YOLO(MODEL) + f = model.export(format="pb") + YOLO(f)(SOURCE) -def test_export_paddle(enabled=False): +@pytest.mark.skipif(True, reason="Test disabled as Paddle protobuf and ONNX protobuf requirementsk conflict.") +def test_export_paddle(): """ Test exporting the YOLO model to Paddle format. Note Paddle protobuf requirements conflicting with onnx protobuf requirements. """ - if enabled: - YOLO(MODEL).export(format="paddle") + YOLO(MODEL).export(format="paddle") @pytest.mark.slow @@ -436,12 +437,12 @@ def test_utils_checks(): checks.git_describe(ROOT) checks.check_requirements() # check requirements.txt checks.check_imgsz([600, 600], max_dim=1) - checks.check_imshow() + checks.check_imshow(warn=True) checks.check_version("ultralytics", "8.0.0") checks.print_args() - # checks.check_imshow(warn=True) +@pytest.mark.skipif(WINDOWS, reason="Windows profiling is extremely slow (cause unknown)") def test_utils_benchmarks(): """Test model benchmarking.""" from ultralytics.utils.benchmarks import ProfileModels