Files
agent-framework/.github/workflows/python-code-quality.yml
T
dependabot[bot] 92ba3513fc Bump j178/prek-action from 1 to 2
Bumps [j178/prek-action](https://github.com/j178/prek-action) from 1 to 2.
- [Release notes](https://github.com/j178/prek-action/releases)
- [Commits](https://github.com/j178/prek-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: j178/prek-action
  dependency-version: '2'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-22 14:32:28 +00:00

142 lines
3.7 KiB
YAML

name: Python - Code Quality
on:
merge_group:
workflow_dispatch:
pull_request:
branches: ["main"]
paths:
- "python/**"
env:
# Configure a constant location for the uv cache
UV_CACHE_DIR: /tmp/.uv-cache
jobs:
pre-commit-hooks:
name: Pre-commit Hooks
if: "!cancelled()"
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
runs-on: ubuntu-latest
continue-on-error: true
defaults:
run:
working-directory: ./python
env:
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up python and install the project
id: python-setup
uses: ./.github/actions/python-setup
with:
python-version: ${{ matrix.python-version }}
os: ${{ runner.os }}
env:
UV_CACHE_DIR: /tmp/.uv-cache
- uses: actions/cache@v5
with:
path: ~/.cache/prek
key: prek|${{ matrix.python-version }}|${{ hashFiles('python/.pre-commit-config.yaml') }}
- uses: j178/prek-action@v2
name: Run Pre-commit Hooks (excluding poe-check)
env:
SKIP: poe-check
with:
extra-args: --cd python --all-files
package-checks:
name: Package Checks
if: "!cancelled()"
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
runs-on: ubuntu-latest
continue-on-error: true
defaults:
run:
working-directory: ./python
env:
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up python and install the project
id: python-setup
uses: ./.github/actions/python-setup
with:
python-version: ${{ matrix.python-version }}
os: ${{ runner.os }}
env:
UV_CACHE_DIR: /tmp/.uv-cache
- name: Run syntax and pyright across packages
run: uv run poe check-packages
samples-markdown:
name: Samples & Markdown
if: "!cancelled()"
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
runs-on: ubuntu-latest
continue-on-error: true
defaults:
run:
working-directory: ./python
env:
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up python and install the project
id: python-setup
uses: ./.github/actions/python-setup
with:
python-version: ${{ matrix.python-version }}
os: ${{ runner.os }}
env:
UV_CACHE_DIR: /tmp/.uv-cache
- name: Run samples checks
run: uv run poe check -S
- name: Run markdown code lint
run: uv run poe markdown-code-lint
mypy:
name: Mypy Checks
if: "!cancelled()"
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
runs-on: ubuntu-latest
continue-on-error: true
defaults:
run:
working-directory: ./python
env:
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up python and install the project
id: python-setup
uses: ./.github/actions/python-setup
with:
python-version: ${{ matrix.python-version }}
os: ${{ runner.os }}
env:
UV_CACHE_DIR: /tmp/.uv-cache
- name: Run Mypy
env:
GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref || github.base_ref || 'main' }}
run: uv run python scripts/workspace_poe_tasks.py ci-mypy