Python: Update getting started with workflows sample structure and README (#653)

* Update getting started with workflows sample structure and README

* Small updates

* Adjust getting started samples. Fix agent executor bug. Add workflow tests to unit test file.

* Fix resource links
This commit is contained in:
Evan Mattson
2025-09-09 15:06:22 +09:00
committed by GitHub
Unverified
parent 2472f35876
commit 2699b85285
20 changed files with 103 additions and 61 deletions
+27
View File
@@ -37,6 +37,7 @@ jobs:
- name: Install the project
run: |
uv sync --all-packages --all-extras --dev -U --prerelease=if-necessary-or-explicit
# Main package tests
- name: Set environment variables - main - win
if: ${{ matrix.os == 'windows-latest' }}
@@ -58,6 +59,7 @@ jobs:
with:
name: coverage-${{ matrix.OS }}-${{ matrix.python-version }}-${{ env.PACKAGE_NAME }}
path: ./python/coverage_${{ matrix.OS }}_${{ matrix.python-version }}_${{ env.PACKAGE_NAME }}.xml
# Azure package tests
- name: Set environment variables - azure - win
if: ${{ matrix.os == 'windows-latest' }}
@@ -79,6 +81,7 @@ jobs:
with:
name: coverage-${{ matrix.OS }}-${{ matrix.python-version }}-${{ env.PACKAGE_NAME }}
path: ./python/coverage_${{ matrix.OS }}_${{ matrix.python-version }}_${{ env.PACKAGE_NAME }}.xml
# Foundry package tests
- name: Set environment variables - foundry - win
if: ${{ matrix.os == 'windows-latest' }}
@@ -100,6 +103,30 @@ jobs:
with:
name: coverage-${{ matrix.OS }}-${{ matrix.python-version }}-${{ env.PACKAGE_NAME }}
path: ./python/coverage_${{ matrix.OS }}_${{ matrix.python-version }}_${{ env.PACKAGE_NAME }}.xml
# Workflow package tests
- name: Set environment variables - workflow - win
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo "PACKAGE_NAME=workflow" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Set environment variables - workflow
if: ${{ matrix.os != 'windows-latest' }}
run: |
echo "PACKAGE_NAME=workflow" >> $GITHUB_ENV
- name: Test with pytest - workflow
run: uv run poe --directory ./packages/${{ env.PACKAGE_NAME }} test --junitxml=coverage.xml
working-directory: ./python
- name: Move coverage file - workflow
run: |
mv ./packages/${{ env.PACKAGE_NAME }}/coverage.xml coverage_${{ matrix.OS }}_${{ matrix.python-version }}_${{ env.PACKAGE_NAME }}.xml
working-directory: ./python
- name: Upload coverage artifact - workflow
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.OS }}-${{ matrix.python-version }}-${{ env.PACKAGE_NAME }}
path: ./python/coverage_${{ matrix.OS }}_${{ matrix.python-version }}_${{ env.PACKAGE_NAME }}.xml
# Surface failing tests
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@v0.7.2