unsloth/.github/workflows
Daniel Han 42ec2590a2 CI(lint): turn the studio-backend ruff stub into a real Python gate
Rename the job to "Python lint (syntax + ruff + safety nets)" and
expand it from one non-blocking ruff invocation over studio/backend
into four real gates over the whole tree. Total CI time goes from
~8 s to ~12 s, but the previous job was informational; this one
blocks merges on actual breakage.

Steps (in order):
  1. AST/syntax (HARD GATE)
     `python -m compileall -q -j 0 unsloth unsloth_cli studio tests
      cli.py unsloth-cli.py`. Same parser the interpreter uses;
     anything broken here would also crash at `import X` on a user's
     machine. ~3.5 s across 350+ files locally.

  2. ruff check whole repo (HARD GATE)
     The narrow rule set in pyproject.toml [tool.ruff.lint] (E9 /
     F63 / F7 / F82) catches undefined names, broken comparisons,
     and syntax. The whole repo passes today, so the previous
     studio/backend-only `|| true` was masking real breakage on
     the wider tree. <1 s.

  3. Debugger-leftover scan (HARD GATE)
     AST-walk over every committed .py looking for `breakpoint()`,
     `pdb.set_trace()`, or `ipdb.set_trace()` call sites. AST-based
     so commented-out debugger lines don't false-positive (which
     is why a bare grep would not work -- there are three commented
     `# breakpoint()` markers in unsloth/models/rl* today). 0 hits
     locally across 350 files.

  4. SPDX-License-Identifier on studio/backend (WARNING)
     Surfaces drift in the one tree where we already have a strict
     SPDX policy. Currently 3 files missing; warned, not blocked,
     so the rollout can be a separate PR.

  5. ruff format drift (INFO)
     Counts files that would be reformatted by plain `ruff format`.
     Non-blocking because the canonical formatter is
     scripts/run_ruff_format.py = ruff format + the kwarg-spacing
     pass, so plain `ruff format --check` always reports a large
     diff. Once that custom pipeline is wired in, drop
     continue-on-error and add it to the gate.

ruff is pinned to 0.15.12 to match .pre-commit-config.yaml so a
CI-only ruff bump cannot start disagreeing with what pre-commit
already accepted.
2026-05-06 21:00:15 +00:00
..
mlx-ci.yml ci(mlx): fix path filter that pointed at a non-existent file 2026-05-06 12:13:21 +00:00
release-desktop.yml Fix Studio desktop tray installer and titlebar and bux fixes (#5179) 2026-04-30 08:40:39 -07:00
stale.yml chore: Update outdated GitHub Actions version (#3936) 2026-01-27 07:19:38 -08:00
studio-backend-ci.yml CI(lint): turn the studio-backend ruff stub into a real Python gate 2026-05-06 21:00:15 +00:00
studio-frontend-ci.yml CI: scope GITHUB_TOKEN permissions and unblock ~60 skipped tests 2026-05-06 11:52:21 +00:00
studio-inference-smoke.yml CI: pass GH_TOKEN to install/update steps to dodge GitHub API rate limits 2026-05-06 13:20:45 +00:00
studio-tauri-smoke.yml CI: scope GITHUB_TOKEN permissions and unblock ~60 skipped tests 2026-05-06 11:52:21 +00:00
studio-ui-smoke.yml CI: pass GH_TOKEN to install/update steps to dodge GitHub API rate limits 2026-05-06 13:20:45 +00:00
studio-update-smoke.yml CI: pass GH_TOKEN to install/update steps to dodge GitHub API rate limits 2026-05-06 13:20:45 +00:00
wheel-smoke.yml CI: scope GITHUB_TOKEN permissions and unblock ~60 skipped tests 2026-05-06 11:52:21 +00:00