mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
7e9c043c4c
* Improve PR template and breaking-change label automation - Add a structured "Related Issue" section using GitHub closing keywords - Add a Review Guide prompt (major changes, impact, reviewer focus) with a note that the focus item is for human reviewers only - Add checklist items for issue linkage / no duplicate PRs and invert the breaking-change item (checked = not breaking) - Extend label-title-prefix to prepend [BREAKING] when the "breaking change" label is added - Add label-breaking-change workflow to apply the "breaking change" label when a PR title contains [BREAKING] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add pull-requests agent skill with dotnet/python links - Add root .github/skills/pull-requests/SKILL.md covering PR description authoring (following the PR template) and the review-comment workflow (review -> plan -> user review -> implement -> reply to all -> resolve) - Symlink the skill from python/.github/skills and dotnet/.github/skills - Reference the skill from python/AGENTS.md and dotnet/AGENTS.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fold breaking-change labeling into label-pr workflow Move the title -> 'breaking change' label logic into the existing label-pr workflow (which already applies the python/.NET labels) and drop the separate label-breaking-change workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR title prefix review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Pin patched MessagePack for .NET restore Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert MessagePack central pin Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Move title prefix tests out of tracked GitHub tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Exclude skill docs from CI path filters Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Match skill symlinks in CI path exclusions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Exclude AGENTS docs from CI path filters Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Scope title-prefix normalization to a real prefix The normalization branch in addTitlePrefix matched ^Python (no colon), so titles like "Python samples improvements" or "Pythonic refactor" were treated as already-prefixed and only re-cased, never receiving the "Python: " prefix. Scope the match to ^<prefix>:\s* so only an actual existing prefix is normalized; otherwise the prefix is prepended. Same fix applies to the .NET prefix (e.g. ".NETStandard bump"). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
108 lines
3.3 KiB
YAML
108 lines
3.3 KiB
YAML
name: Python - Lab Tests
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches: ["main"]
|
|
paths:
|
|
- "python/packages/lab/**"
|
|
merge_group:
|
|
branches: ["main"]
|
|
schedule:
|
|
- cron: "0 0 * * *" # Run at midnight UTC daily
|
|
|
|
env:
|
|
# Configure a constant location for the uv cache
|
|
UV_CACHE_DIR: /tmp/.uv-cache
|
|
|
|
jobs:
|
|
paths-filter:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
outputs:
|
|
pythonChanges: ${{ steps.filter.outputs.python}}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
python:
|
|
- 'python/**'
|
|
- '!python/AGENTS.md'
|
|
- '!python/**/AGENTS.md'
|
|
- '!python/.github/skills/*'
|
|
- '!python/.github/skills/**'
|
|
# run only if 'python' files were changed
|
|
- name: python tests
|
|
if: steps.filter.outputs.python == 'true'
|
|
run: echo "Python file"
|
|
# run only if not 'python' files were changed
|
|
- name: not python tests
|
|
if: steps.filter.outputs.python != 'true'
|
|
run: echo "NOT python file"
|
|
|
|
python-lab-tests:
|
|
name: Python Lab Tests
|
|
needs: paths-filter
|
|
if: needs.paths-filter.outputs.pythonChanges == 'true'
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
# TODO(ekzhu): re-enable macos-latest when this is fixed: https://github.com/actions/runner-images/issues/11881
|
|
os: [ubuntu-latest, windows-latest]
|
|
env:
|
|
UV_PYTHON: ${{ matrix.python-version }}
|
|
permissions:
|
|
contents: read
|
|
defaults:
|
|
run:
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
|
|
- 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 }}
|
|
exclude-packages: ${{ matrix.python-version == '3.10' && 'agent-framework-github-copilot' || '' }}
|
|
env:
|
|
# Configure a constant location for the uv cache
|
|
UV_CACHE_DIR: /tmp/.uv-cache
|
|
|
|
# Lab specific tests
|
|
- name: Run lab tests
|
|
run: cd packages/lab && uv run poe test
|
|
|
|
- name: Run resource-intensive lab tests
|
|
run: cd packages/lab && uv run pytest -m "resource_intensive and not integration" --junitxml=test-results-resource-intensive.xml
|
|
|
|
- name: Run lab lint
|
|
run: cd packages/lab && uv run poe lint
|
|
|
|
- name: Run lab format check
|
|
run: cd packages/lab && uv run poe fmt --check
|
|
|
|
- name: Run lab type checking
|
|
run: cd packages/lab && uv run poe pyright
|
|
|
|
- name: Run lab mypy
|
|
run: cd packages/lab && uv run poe mypy
|
|
|
|
# Surface failing tests
|
|
- name: Surface failing tests
|
|
if: always()
|
|
uses: pmeier/pytest-results-action@20b595761ba9bf89e115e875f8bc863f913bc8ad # v0.7.2
|
|
with:
|
|
path: ./python/packages/lab/**.xml
|
|
summary: true
|
|
display-options: fEX
|
|
fail-on-empty: false
|
|
title: Lab Test Results
|