unsloth/.github/workflows
Daniel Han 5cebc46124
Make the unsloth_cli studio tests pass in isolation (#7599)
* Make the unsloth_cli studio tests pass in isolation

Six tests in test_studio_run_parallel_flag.py and one in
test_studio_secure_flag.py only passed in a full-directory run. All of them
reach the in-venv branch of run(), which does `from state.tool_policy import
set_tool_policy`. That module lives under studio/backend, so it only imports
once something has put that directory on sys.path, and nothing in either file
does. They were relying on test_start.py, which calls
ensure_studio_backend_path() and leaks the sys.path entry, or on
test_studio_cloudflare_flag.py, which stubs the module.

Add a stub_tool_policy_state fixture in a new conftest and use it in the seven,
so the state comes from the test rather than from whatever ran first.

Every file in unsloth_cli/tests now passes on its own, and the suite is stable
across four pytest-randomly seeds.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-07-29 01:33:19 -07:00
..
consolidated-tests-ci.yml Parse a .json dataset file as one JSON document instead of line-by-line (#7422) 2026-07-28 21:40:43 -03:00
cross-platform-parity-ci.yml Installer: restore interrupted updates and clean stale rollback environments (#7342) 2026-07-23 01:29:53 -07:00
lint-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
local-agent-guides-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
lockfile-audit.yml CI: pin lockfile-audit actions to commit SHAs (#6902) 2026-07-06 07:11:33 -07:00
mlx-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
notebooks-ci.yml CI: add PyPI extra-index to CPU torch installs to fix sympy resolution (#6660) 2026-06-29 17:35:26 -03:00
ossf.yml Create ossf.yml (#6952) 2026-07-07 17:10:01 -07:00
release-desktop.yml Show release notes in the update popup, sourced from CHANGELOG.md (#7432) 2026-07-28 21:26:43 -07:00
security-audit.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
stale.yml CI: scope GITHUB_TOKEN permissions, add MLX CI, unblock ~60 skipped tests (#5312) 2026-05-11 03:19:13 -07:00
startup-profile-ci.yml Measure where Studio's startup time actually goes (#7553) 2026-07-28 22:24:34 -07:00
studio-api-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-backend-ci.yml Make the unsloth_cli studio tests pass in isolation (#7599) 2026-07-29 01:33:19 -07:00
studio-export-capability-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-frontend-ci.yml Studio: preserve durations across reasoning blocks (#7520) 2026-07-28 04:53:26 -07:00
studio-inference-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-load-orchestrator-ci.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-mac-api-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-mac-inference-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-mac-install-matrix.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-mac-ui-smoke.yml Studio: clarify tool permission controls (#7181) 2026-07-20 09:55:39 -03:00
studio-mac-update-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-tauri-smoke.yml Studio: run the src-tauri unit tests in CI and fix the two that never ran (#7558) 2026-07-28 07:01:13 -07:00
studio-ui-smoke.yml Studio: drive UI font size through a typography scale instead of the root font size (#7359) 2026-07-23 01:26:56 -07:00
studio-update-smoke.yml Studio: detect an interrupted dependency install instead of launching a backend that cannot import (#7492) 2026-07-28 10:57:20 +02:00
studio-windows-api-smoke.yml Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
studio-windows-inference-smoke.yml Extract Get-HostMachineArch for the VC++ round-trip test (#7597) 2026-07-29 00:52:41 -07:00
studio-windows-ui-smoke.yml Studio: clarify tool permission controls (#7181) 2026-07-20 09:55:39 -03:00
studio-windows-update-smoke.yml Fix Windows no-torch setup (#7511) 2026-07-28 05:54:25 -07:00
version-compat-ci.yml version-compat CI: fake CPU training runs for SFT/GRPO/DPO (#6965) 2026-07-08 04:06:28 -07:00
wheel-smoke.yml Studio: detect an interrupted dependency install instead of launching a backend that cannot import (#7492) 2026-07-28 10:57:20 +02:00