mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
6aa746d891
* initial work on User Approval (and hosted mcp to validate) * small update to the comments in the sample * enable local MCP tools in chatClient get methods * working streaming and improved setup * fix for pyright * updated create_approval -> create_response method * added tests * updated HostedMcpTool and addressed feedback * update type name * naming updates * small docstring update * mypy fix * fixes and updates * fixes for responses * fix int tests * removed broken tests * updated test running * removed specific content check on websearch * increased timeout * split slow foundry test * don't parallel run samples * add dist load to unit tests --------- Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: Python - Test Coverage
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ["main", "feature*"]
|
|
paths:
|
|
- "python/packages/**"
|
|
- "python/tests/unit/**"
|
|
env:
|
|
# Configure a constant location for the uv cache
|
|
UV_CACHE_DIR: /tmp/.uv-cache
|
|
|
|
jobs:
|
|
python-tests-coverage:
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: false
|
|
defaults:
|
|
run:
|
|
working-directory: python
|
|
env:
|
|
UV_PYTHON: "3.10"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# Save the PR number to a file since the workflow_run event
|
|
# in the coverage report workflow does not have access to it
|
|
- name: Save PR number
|
|
run: |
|
|
echo ${{ github.event.number }} > ./pr_number
|
|
- name: Set up uv
|
|
uses: astral-sh/setup-uv@v6
|
|
with:
|
|
version-file: "python/pyproject.toml"
|
|
enable-cache: true
|
|
cache-suffix: ${{ runner.os }}-${{ env.UV_PYTHON }}
|
|
cache-dependency-glob: "**/uv.lock"
|
|
- name: Install the project
|
|
run: uv sync --all-extras --dev
|
|
- name: Run all tests with coverage report
|
|
run: uv run poe all-tests -n logical --dist loadfile --dist worksteal --cov-report=xml:python-coverage.xml -q --junitxml=pytest.xml
|
|
- name: Upload coverage report
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: |
|
|
python/python-coverage.xml
|
|
python/pytest.xml
|
|
python/pr_number
|
|
overwrite: true
|
|
retention-days: 1
|
|
if-no-files-found: error
|