Files
livekit-agents/.github/workflows/ci.yml
renovate[bot] 7ed144ab57 chore(deps): update astral-sh/setup-uv action to v10 (#7048)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-03 16:36:26 -07:00

80 lines
2.3 KiB
YAML

name: CI
on:
push:
branches: [main, 0.x]
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'
workflow_dispatch:
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
cache-suffix: ruff
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.12"
- name: Install Ruff
run: uv sync --locked --only-group lint
- name: Ruff
run: uv run --no-sync ruff check --output-format=github .
continue-on-error: true
id: ruff-check
- name: Check format
run: uv run --no-sync ruff format --check .
continue-on-error: true
id: ruff-format
- name: Report ruff errors
if: steps.ruff-check.outcome == 'failure' || steps.ruff-format.outcome == 'failure'
run: |
echo "::error::Ruff checks failed. Please run 'make fix' locally to automatically fix formatting and linting issues."
exit 1
type-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.13"]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Cache mypy
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .mypy_cache
key: mypy-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}-${{ github.run_id }}
restore-keys: |
mypy-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}-
mypy-${{ matrix.python-version }}-
- name: Check Types
run: uv run python scripts/check_types.py