Files
agent-framework/.github/workflows/python-test-coverage.yml
T
Eduard van Valkenburg 65dd48aa1d Python: api doc generation setup (#342)
* api doc generation setup

* remove old log file

* improved check md function

* update with sample code in docstring

* updated script

* docs update

* docs update and action

* removed all-extras

* fixed sync command

* moved install

* moved action

* renamed folder

* fixed syntax

* add python path

* fix mypy and reused steps

* updated merge test

* undo change

* slight update in poe commands

* dev setup update

* updated uvlock
2025-09-16 10:02:53 +00:00

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@v5
# 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 python and install the project
id: python-setup
uses: ./.github/actions/python-setup
with:
python-version: ${{ matrix.python-version }}
os: ${{ runner.os }}
env:
# Configure a constant location for the uv cache
UV_CACHE_DIR: /tmp/.uv-cache
- 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