-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
[Infra] Migrate more CI jobs from CircleCI to GitHub Actions #26261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
shin-berri
merged 1 commit into
litellm_internal_staging
from
litellm_code_quality_to_gha
Apr 22, 2026
+199
−100
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| name: Code Quality Checks | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - litellm_internal_staging | ||
| - litellm_oss_branch | ||
| - "litellm_**" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| code-quality: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Checkout litellm-docs (for documentation_tests) | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| with: | ||
| repository: BerriAI/litellm-docs | ||
| path: _litellm_docs_checkout | ||
| persist-credentials: false | ||
|
|
||
| - name: Wire up docs path expected by documentation_tests/* | ||
| run: | | ||
| # documentation_tests scripts read from docs/my-website/docs/... | ||
| # In litellm-docs the same files live at docs/... (repo root). | ||
| # Point docs/my-website -> litellm-docs checkout so the paths resolve. | ||
| rm -rf docs/my-website | ||
| ln -s ../_litellm_docs_checkout docs/my-website | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 | ||
| with: | ||
| version: "0.10.9" | ||
|
|
||
| - name: Cache uv dependencies | ||
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | ||
| with: | ||
| path: | | ||
| ~/.cache/uv | ||
| .venv | ||
| key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-uv- | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --frozen --all-groups --all-extras | ||
|
|
||
| - name: check_licenses | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/check_licenses.py | ||
|
|
||
| - name: check_provider_folders_documented | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/check_provider_folders_documented.py | ||
|
|
||
| - name: router_code_coverage | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/router_code_coverage.py | ||
|
|
||
| - name: test_chat_completion_imports | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/test_chat_completion_imports.py | ||
|
|
||
| - name: info_log_check | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/info_log_check.py | ||
|
|
||
| - name: check_guardrail_apply_decorator | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/check_guardrail_apply_decorator.py | ||
|
|
||
| - name: test_ban_set_verbose | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/test_ban_set_verbose.py | ||
|
|
||
| - name: code_qa_check_tests | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/code_qa_check_tests.py | ||
|
|
||
| - name: check_get_model_cost_key_performance | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/check_get_model_cost_key_performance.py | ||
|
|
||
| - name: test_proxy_types_import | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/test_proxy_types_import.py | ||
|
|
||
| - name: callback_manager_test | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/callback_manager_test.py | ||
|
|
||
| - name: recursive_detector | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/recursive_detector.py | ||
|
|
||
| - name: test_router_strategy_async | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/test_router_strategy_async.py | ||
|
|
||
| - name: litellm_logging_code_coverage | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/litellm_logging_code_coverage.py | ||
|
|
||
| - name: ensure_async_clients_test | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/ensure_async_clients_test.py | ||
|
|
||
| - name: enforce_llms_folder_style | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/enforce_llms_folder_style.py | ||
|
|
||
| - name: prevent_key_leaks_in_exceptions | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/prevent_key_leaks_in_exceptions.py | ||
|
|
||
| - name: check_unsafe_enterprise_import | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/check_unsafe_enterprise_import.py | ||
|
|
||
| - name: ban_copy_deepcopy_kwargs | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/ban_copy_deepcopy_kwargs.py | ||
|
|
||
| - name: check_fastuuid_usage | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/check_fastuuid_usage.py | ||
|
|
||
| - name: memory_test | ||
| run: uv run --no-sync python ./tests/code_coverage_tests/memory_test.py | ||
|
|
||
| - name: documentation_test_env_keys | ||
| run: uv run --no-sync python ./tests/documentation_tests/test_env_keys.py | ||
|
|
||
| - name: documentation_test_router_settings | ||
| run: uv run --no-sync python ./tests/documentation_tests/test_router_settings.py | ||
|
|
||
| - name: documentation_test_api_docs | ||
| run: uv run --no-sync python ./tests/documentation_tests/test_api_docs.py | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Semgrep | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - litellm_internal_staging | ||
| - litellm_oss_branch | ||
| - "litellm_**" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| semgrep: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 | ||
| with: | ||
| version: "0.10.9" | ||
|
|
||
| - name: Run Semgrep (custom rules) | ||
| run: uv tool run --from 'semgrep==1.157.0' semgrep scan --config .semgrep/rules . --error |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
litellm-docsis privateactions/checkoutwithout an explicittokenuses the job'sGITHUB_TOKEN, which is scoped to the current repository only. IfBerriAI/litellm-docsis a private repository, this step will fail with a 403 for every PR — including those opened by team members — becauseGITHUB_TOKENdoes not grant cross-repo access. Add a PAT (or a fine-grained token stored as a secret) via thetoken:parameter, or confirm the repo is public so anonymous clone works without credentials.