| name: LiteLLM Proxy CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Run Unit & Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run Test Suite | |
| run: | | |
| python -m unittest test_proxy.py | |
| - name: Trigger Render Deployment | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| env: | |
| deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }} | |
| run: | | |
| if [ -z "$deploy_url" ]; then | |
| echo "⚠️ WARNING: RENDER_DEPLOY_HOOK_URL secret is not configured in GitHub repository. Skipping deployment." | |
| else | |
| echo "🚀 Triggering Render deployment..." | |
| curl -f -X POST "$deploy_url" | |
| fi | |