Skip to content

⬆️(deps): Update litellm requirement from <1.92,>=1.81.0 to >=1.81.0,<1.97 in /packages/mewbo_core #589

⬆️(deps): Update litellm requirement from <1.92,>=1.81.0 to >=1.81.0,<1.97 in /packages/mewbo_core

⬆️(deps): Update litellm requirement from <1.92,>=1.81.0 to >=1.81.0,<1.97 in /packages/mewbo_core #589

Workflow file for this run

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
uses: actions/upload-artifact@v4
with:
name: coverage-xml
path: |
coverage.xml
coverage-core.xml
- name: Upload overall coverage to Codecov
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
uses: codecov/codecov-action@v5
with:
files: ./coverage-core.xml
flags: core
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
use_oidc: true