⬆️(deps): Update litellm requirement from <1.92,>=1.81.0 to >=1.81.0,<1.99 in /packages/mewbo_core #592
Workflow file for this run
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
| name: Python Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - "packages/**" | |
| - "apps/mewbo_api/**" | |
| - "apps/mewbo_cli/**" | |
| - "apps/mewbo_mcp/**" | |
| - "apps/mewbo_ha_conversation/**" | |
| - "tests/**" | |
| - "demo/seeder/**" | |
| # The generators under scripts/ci are the only other way a COMMITTED | |
| # generated artifact drifts from its source, and both have a freshness | |
| # test in tests/ — which cannot run on a change this filter excludes. | |
| - "scripts/ci/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/coverage.yml" | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: "Git ref (branch or tag) to test" | |
| required: false | |
| permissions: | |
| contents: read | |
| id-token: write | |
| # One run per PR; a new commit cancels the superseded run. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| coverage: | |
| name: pytest + coverage | |
| runs-on: ubuntu-22.04 | |
| env: | |
| COVERAGE_FILE: .coverage | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.ref || github.ref }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install uv | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install uv | |
| - name: Install dependencies | |
| run: | | |
| uv sync --all-extras --group dev | |
| # pytest-cov's own flags, NOT `coverage run -m pytest`. The bare form | |
| # instruments only the outer process, so the moment this run is | |
| # distributed the workers — spawned through execnet — go uncounted and the | |
| # report silently collapses toward zero for everything they executed. | |
| # pytest-cov starts coverage inside each worker and combines the data | |
| # itself. `--cov-report=` suppresses its own terminal output; the report | |
| # and xml steps below read ${COVERAGE_FILE} exactly as before. | |
| - name: Run pytest with coverage | |
| run: | | |
| .venv/bin/python -m pytest \ | |
| --cov=mewbo_core \ | |
| --cov=mewbo_tools \ | |
| --cov=mewbo_ha_conversation \ | |
| --cov-report= | |
| .venv/bin/coverage report --data-file "${COVERAGE_FILE}" --skip-covered | |
| .venv/bin/coverage xml --data-file "${COVERAGE_FILE}" -o coverage.xml | |
| - name: Generate core-only coverage report | |
| run: | | |
| .venv/bin/coverage xml \ | |
| --data-file "${COVERAGE_FILE}" \ | |
| --include "packages/mewbo_core/src/mewbo_core/*" \ | |
| --include "*/packages/mewbo_core/src/mewbo_core/*" \ | |
| -o coverage-core.xml | |
| - name: Upload coverage artifact | |
| # Same reason as the console workflow's artifact step: the v4 artifact | |
| # API is a github.com service and the self-hosted runner answers it with | |
| # a hard error, so a fully GREEN suite still reported a failed job — the | |
| # worst possible signal, because the red says "tests" and means "upload". | |
| if: github.server_url == 'https://github.com' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-xml | |
| path: | | |
| coverage.xml | |
| coverage-core.xml | |
| # Both Codecov steps are github.com-only, and `fail_ci_if_error: false` is | |
| # NOT enough to make them safe elsewhere: `use_oidc` makes the action fetch | |
| # an ID token FIRST, and Gitea Actions serves no OIDC endpoint, so it dies | |
| # on "Unable to get ACTIONS_ID_TOKEN_REQUEST_URL" before the upload — and | |
| # before the flag that was supposed to forgive an upload failure is ever | |
| # consulted. A whole green suite (11,813 passed) therefore reported a red | |
| # job, which is the worst kind of red: it says "tests" and means "telemetry". | |
| - name: Upload overall coverage to Codecov | |
| if: github.server_url == 'https://github.com' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| use_oidc: true | |
| - name: Upload core coverage to Codecov | |
| if: github.server_url == 'https://github.com' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage-core.xml | |
| flags: core | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| use_oidc: true |