Add Agent class to top-level imports #526
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ty Type Checks | |
| on: | |
| pull_request: | |
| branches: | |
| - "develop" | |
| concurrency: | |
| group: ${{ github.workflow_ref }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ty: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup environment | |
| uses: ./.github/actions/setup-environment | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v46.0.3 | |
| - name: Filter Python files | |
| id: filter-python | |
| run: | | |
| python_files=() | |
| for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
| if [[ $file == *.py ]]; then | |
| python_files+=("${file}") | |
| fi | |
| done | |
| echo "python_files=${python_files[*]}" >> $GITHUB_ENV | |
| - name: Run ty | |
| if: ${{ env.python_files != '' }} | |
| run: | | |
| echo "Running ty on changed files: ${{ env.python_files }}" | |
| # Filter out test files for type checking | |
| src_files=() | |
| for file in ${{ env.python_files }}; do | |
| if [[ ! $file == *"/tests/"* && ! $file == *"/codegen_tests/"* ]]; then | |
| src_files+=("${file}") | |
| fi | |
| done | |
| # Only run type checking if there are source files to check | |
| if [ ${#src_files[@]} -gt 0 ]; then | |
| echo "Running ty on source files: ${src_files[*]}" | |
| uv run ty check --output-format concise --python-version 3.12 ${src_files[@]} | |
| else | |
| echo "No source files to check, skipping ty" | |
| fi |