Skip to content

chore(litellm): CI Failures For LiteLLM #4822

chore(litellm): CI Failures For LiteLLM

chore(litellm): CI Failures For LiteLLM #4822

Workflow file for this run

name: Python CI
on:
push:
branches: [ main ]
pull_request:
paths:
- "python/**"
workflow_dispatch:
concurrency:
group: test-python-${{ github.head_ref }}
cancel-in-progress: true
jobs:
changes:
name: Filter Changes
runs-on: ubuntu-latest
outputs:
diff: ${{ steps.filter.outputs.diff }}
diff_files: ${{ steps.filter.outputs.diff_files }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: json
filters: |
diff:
- "python/instrumentation/**/*.py"
- "python/instrumentation/**/*.pyi"
- "python/instrumentation/**/*.toml"
- "python/instrumentation/**/*.yaml"
- "python/openinference-*/**/*.py"
- "python/openinference-*/**/*.pyi"
- "python/openinference-*/**/*.toml"
- "python/openinference-*/**/*.yaml"
find-tox-testenv:
name: Find Tox Testenv
needs: changes
if: ${{ needs.changes.outputs.diff == 'true' }}
runs-on: ubuntu-latest
outputs:
list: ${{ steps.testenv.outputs.list }}
steps:
- name: Find tox environments to run
uses: actions/checkout@v4
with:
sparse-checkout: python
- uses: astral-sh/setup-uv@v5
with:
version: 0.6.3
enable-cache: false
- run: |
DIFF_FILES='${{ needs.changes.outputs.diff_files }}'
TOX_ENVIRONMENTS=$(uvx --with tox-uv tox list | grep ^py | awk '{print $1}' | jq -R . | jq -sc .)
SELECTED_TOX_ENVIRONMENTS=$(python3 scripts/select_tox_environments.py "$DIFF_FILES" "$TOX_ENVIRONMENTS")
echo "list=$SELECTED_TOX_ENVIRONMENTS" >> $GITHUB_OUTPUT
working-directory: python
id: testenv
- name: Fail if no testenv is found
if: ${{ steps.testenv.outputs.list == '[]' }}
run: exit 1
run-tox-testenv:
name: ${{ matrix.testenv }}
needs: find-tox-testenv
if: ${{ needs.find-tox-testenv.outputs.list != '[]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testenv: ${{ fromJSON(needs.find-tox-testenv.outputs.list) }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: python
- uses: astral-sh/setup-uv@v5
with:
version: 0.6.3
enable-cache: false
- run: uvx --with tox-uv tox run -e ${{ matrix.testenv }}
working-directory: python
timeout-minutes: 15