litellm/.github/workflows/root-entry-limit.yml
yuneng-jiang 20f0c8bc51
ci(lint): run the fast lint checks on pull requests again without compiling Rust (#53421)
code-quality, ci-coverage, semgrep and root-entry-limit moved to main-only to fit the
pull request gate into five minutes. Most of that time was uv sync compiling litellm's
Rust extension, which only 6 of the 44 code-quality checks need.

code-quality now installs only the lint tools and runs its 38 checks 4 at a time through
run_parallel_checks.py. The 6 checks that import litellm move to lint-runtime, which
installs the shared Rust bridge wheel, and lint-runtime now also runs on pushes to main
so those checks keep running there. ci-coverage, semgrep and root-entry-limit run on
every pull request again.
2026-11-21 14:17:30 -08:00

28 lines
766 B
YAML

name: Root entry limit
on:
pull_request: {}
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
root-entry-limit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
persist-credentials: false
- name: Check root entry count
env:
MAX_ROOT_ENTRIES: 15
run: |
count=$(find . -mindepth 1 -maxdepth 1 -printf '.\n' | wc -l)
echo "Root has $count entries. Maximum is $MAX_ROOT_ENTRIES."
if [ "$count" -gt "$MAX_ROOT_ENTRIES" ]; then
echo "::error::Repository root exceeds $MAX_ROOT_ENTRIES entries. Move new files into an existing directory."
exit 1
fi