From eae6829cf9289916c1a0007c805dd377367fdfcc Mon Sep 17 00:00:00 2001 From: Shine Date: Thu, 8 Oct 2026 17:05:03 +0800 Subject: [PATCH 1/2] ci(model): run real CPU smoke test on model or workflow changes --- .github/workflows/real-yolo-smoke.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/real-yolo-smoke.yml b/.github/workflows/real-yolo-smoke.yml index 7941444..cf59746 100644 --- a/.github/workflows/real-yolo-smoke.yml +++ b/.github/workflows/real-yolo-smoke.yml @@ -1,9 +1,15 @@ name: Real YOLO CPU smoke test -# Intentionally manual: installing CPU inference dependencies is expensive -# and model compatibility needs deliberate review. +# Run only when model assets, this smoke test, or its workflow change. +# Ordinary docs and application PRs keep using the lightweight checks. on: workflow_dispatch: + push: + branches: [main] + paths: + - '.github/workflows/real-yolo-smoke.yml' + - 'inference/tests/smoke_real_model.py' + - 'inference/weights/**' permissions: contents: read From 1de2f0fb73bfb6a842895b7dc6475365964f4e1c Mon Sep 17 00:00:00 2001 From: Shine Date: Thu, 8 Oct 2026 17:05:13 +0800 Subject: [PATCH 2/2] docs(ci): explain selective model smoke trigger --- docs/TESTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/TESTING.md b/docs/TESTING.md index a99c97b..5860648 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -10,7 +10,7 @@ ## Run the real inference smoke test -After the workflow is available on `main`, from an authenticated GitHub CLI terminal: +The workflow runs automatically on `main` when model checkpoints, its test script, or the smoke workflow are changed. It can also be triggered manually from an authenticated GitHub CLI terminal: ```powershell gh workflow run real-yolo-smoke.yml -R FuTseYi/CropLens @@ -19,7 +19,7 @@ gh run list -R FuTseYi/CropLens --workflow real-yolo-smoke.yml --limit 1 Alternatively, use **Actions → Real YOLO CPU smoke test → Run workflow** in the GitHub repository. -The optional test installs CPU PyTorch/Ultralytics packages and may download substantial dependencies. It is intentionally not run on every PR. Read the run logs for the actual pass/fail status. A passing smoke test indicates only that **one checkpoint can load and process one repository sample**; it says nothing about inference accuracy or deployment readiness. +The optional test installs CPU PyTorch/Ultralytics packages and may download substantial dependencies. It is intentionally not run on every PR or on ordinary documentation updates. Read the run logs for the actual pass/fail status. A passing smoke test indicates only that **one checkpoint can load and process one repository sample**; it says nothing about inference accuracy or deployment readiness. ## Before claiming production readiness