mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
* test(ui): run vitest unit tests in GitHub Actions and fix stale key-info tests The dashboard's vitest suite only ran on CircleCI; GitHub Actions covered the UI build, lint and api-types sync but never the unit tests. Add a UI Unit Tests workflow that runs the suite, sharded across a matrix so the wall-clock is not bound by a single 4-core runner. Porting it surfaced 17 pre-existing failures. Adding the block/unblock key action moved Delete Key and Reset Spend into a "More key actions" dropdown and introduced a React Query hook; KeyInfoHeader's own test was updated but the two KeyInfoView test files were not. Reach those actions through the dropdown and stub the new hook the way the neighbouring hook is already stubbed. The same refactor had quietly hollowed out assertions that still passed: "should not show Reset Spend button for regular key owner" queried for a button role that no longer exists, so it held green regardless of the permission check. Those now open the menu and assert on the menu item, which fails when canResetSpend is forced true. Also add the missing cost-optimization page description; page_utils guards that every navigable page carries one. * ci(ui): scope PR runs to changed tests, run the full suite on staging Running the whole vitest suite on every pull request costs about five minutes, and none of it is recoverable through parallelism: vitest schedules by file and create_mcp_server.test.tsx alone accounts for 252s of the 255s total, so shards and extra cores cannot get under that floor. Measured on this branch, css:false, pool=threads and isolate=false all landed within noise of the baseline. Scope pull requests to tests reachable from the diff instead, which takes 11s here, and keep a full run on pushes to litellm_internal_staging so nothing rots behind a gap in the module graph. Backend-only pull requests match no test files and exit zero; --passWithNoTests states that rather than leaning on it being the current default. The checkout needs full history for --changed to resolve the base commit. |
||
|---|---|---|
| .. | ||
| actions | ||
| codeql | ||
| ISSUE_TEMPLATE | ||
| observatory | ||
| screenshots | ||
| scripts | ||
| workflows | ||
| CODEOWNERS | ||
| dependabot.yaml | ||
| deploy-on-aws.png | ||
| deploy-on-gcp.png | ||
| deploy-to-aws.png | ||
| FUNDING.yml | ||
| pull_request_template.md | ||
| template.yaml | ||