mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
Some checks failed
Unit Tests: Caching (Redis) / caching-redis (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Security / security (push) Has been cancelled
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
name: Check Schema Sync
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'schema.prisma'
|
|
- 'litellm/proxy/schema.prisma'
|
|
- 'litellm-proxy-extras/litellm_proxy_extras/schema.prisma'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check-sync:
|
|
name: Verify schema.prisma copies match root
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Checkout PR
|
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Reject symlinked schema files
|
|
run: |
|
|
for f in schema.prisma litellm/proxy/schema.prisma litellm-proxy-extras/litellm_proxy_extras/schema.prisma; do
|
|
if [ -L "$f" ]; then
|
|
echo "::error file=$f::$f is a symlink, which is not allowed"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
- name: Check all schemas match root
|
|
run: |
|
|
EXIT=0
|
|
|
|
diff schema.prisma litellm/proxy/schema.prisma || {
|
|
echo "::error file=litellm/proxy/schema.prisma::litellm/proxy/schema.prisma differs from root schema.prisma"
|
|
EXIT=1
|
|
}
|
|
|
|
diff schema.prisma litellm-proxy-extras/litellm_proxy_extras/schema.prisma || {
|
|
echo "::error file=litellm-proxy-extras/litellm_proxy_extras/schema.prisma::litellm-proxy-extras/litellm_proxy_extras/schema.prisma differs from root schema.prisma"
|
|
EXIT=1
|
|
}
|
|
|
|
if [ "$EXIT" -ne 0 ]; then
|
|
echo ""
|
|
echo "Schema files are out of sync."
|
|
echo "The root schema.prisma is the source of truth."
|
|
echo ""
|
|
echo "To fix, run from the repo root:"
|
|
echo " cp schema.prisma litellm/proxy/schema.prisma"
|
|
echo " cp schema.prisma litellm-proxy-extras/litellm_proxy_extras/schema.prisma"
|
|
exit 1
|
|
fi
|
|
|
|
echo "All schema copies are in sync with root."
|