# Workflow to run LiteLLM integration tests # This workflow is used to test the LiteLLM integration in opik.integrations.litellm, however # there is another, external, integration with LiteLLM that lives in litellm repository, it's being tested # in a separate workflow: .github/workflows/sdk-e2e-library-tests.yaml # # Please read inputs to provide correct values. # name: SDK Lib LiteLLM Tests run-name: "SDK Lib LiteLLM Tests ${{ github.ref_name }} by @${{ github.actor }}" permissions: contents: read env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} OPENAI_ORG_ID: ${{ secrets.OPENAI_ORG_ID }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPIK_ENABLE_LITELLM_MODELS_MONITORING: False OPIK_SENTRY_ENABLE: False on: workflow_call: jobs: tests: name: LiteLLM Python ${{matrix.python_version}} runs-on: ubuntu-latest timeout-minutes: 30 defaults: run: working-directory: sdks/python strategy: fail-fast: true matrix: python_version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} steps: - name: Check out code uses: actions/checkout@v6 - name: Setup Python ${{matrix.python_version}} uses: actions/setup-python@v5 with: python-version: ${{matrix.python_version}} - name: Install opik run: pip install . - name: Install test tools run: | cd ./tests pip install --no-cache-dir --disable-pip-version-check -r test_requirements.txt - name: Install lib run: | cd ./tests pip install --no-cache-dir --disable-pip-version-check -r library_integration/litellm/requirements.txt - name: Run tests run: | cd ./tests/library_integration/litellm/ python -m pytest -vv .