Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

ci: run mypy on full package instead of changed files only

Greyson LaLonde8a1424534e3e
diff --git a/.github/workflows/type-checker.yml b/.github/workflows/type-checker.yml
index 03a5841a0..7b0cbe2da 100644
--- a/.github/workflows/type-checker.yml
+++ b/.github/workflows/type-checker.yml
@@ -17,8 +17,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- with:
- fetch-depth: 0 # Fetch all history for proper diff
- name: Restore global uv cache
id: cache-restore
@@ -42,37 +40,8 @@ jobs:
- name: Install dependencies
run: uv sync --all-groups --all-extras
- - name: Get changed Python files
- id: changed-files
- run: |
- # Get the list of changed Python files compared to the base branch
- echo "Fetching changed files..."
- git diff --name-only --diff-filter=ACMRT origin/${{ github.base_ref }}...HEAD -- '*.py' > changed_files.txt
-
- # Filter for files in src/ directory only (excluding tests/)
- grep -E "^src/" changed_files.txt > filtered_changed_files.txt || true
-
- # Check if there are any changed files
- if [ -s filtered_changed_files.txt ]; then
- echo "Changed Python files in src/:"
- cat filtered_changed_files.txt
- echo "has_changes=true" >> $GITHUB_OUTPUT
- # Convert newlines to spaces for mypy command
- echo "files=$(cat filtered_changed_files.txt | tr '\n' ' ')" >> $GITHUB_OUTPUT
- else
- echo "No Python files changed in src/"
- echo "has_changes=false" >> $GITHUB_OUTPUT
- fi
-
- - name: Run type checks on changed files
- if: steps.changed-files.outputs.has_changes == 'true'
- run: |
- echo "Running mypy on changed files with Python ${{ matrix.python-version }}..."
- uv run mypy ${{ steps.changed-files.outputs.files }}
-
- - name: No files to check
- if: steps.changed-files.outputs.has_changes == 'false'
- run: echo "No Python files in src/ were modified - skipping type checks"
+ - name: Run type checks
+ run: uv run mypy lib/crewai/src/crewai/
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'