mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
chore: relax mypy configuration and exclude tests from CI (#3452)
This commit is contained in:
10
.github/workflows/type-checker.yml
vendored
10
.github/workflows/type-checker.yml
vendored
@@ -41,18 +41,18 @@ jobs:
|
|||||||
echo "Fetching changed files..."
|
echo "Fetching changed files..."
|
||||||
git diff --name-only --diff-filter=ACMRT origin/${{ github.base_ref }}...HEAD -- '*.py' > changed_files.txt
|
git diff --name-only --diff-filter=ACMRT origin/${{ github.base_ref }}...HEAD -- '*.py' > changed_files.txt
|
||||||
|
|
||||||
# Filter for files in src/ and tests/ directories
|
# Filter for files in src/ directory only (excluding tests/)
|
||||||
grep -E "^(src/|tests/)" changed_files.txt > filtered_changed_files.txt || true
|
grep -E "^src/" changed_files.txt > filtered_changed_files.txt || true
|
||||||
|
|
||||||
# Check if there are any changed files
|
# Check if there are any changed files
|
||||||
if [ -s filtered_changed_files.txt ]; then
|
if [ -s filtered_changed_files.txt ]; then
|
||||||
echo "Changed Python files in src/ and tests/:"
|
echo "Changed Python files in src/:"
|
||||||
cat filtered_changed_files.txt
|
cat filtered_changed_files.txt
|
||||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||||
# Convert newlines to spaces for mypy command
|
# Convert newlines to spaces for mypy command
|
||||||
echo "files=$(cat filtered_changed_files.txt | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
echo "files=$(cat filtered_changed_files.txt | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "No Python files changed in src/ or tests/"
|
echo "No Python files changed in src/"
|
||||||
echo "has_changes=false" >> $GITHUB_OUTPUT
|
echo "has_changes=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ jobs:
|
|||||||
|
|
||||||
- name: No files to check
|
- name: No files to check
|
||||||
if: steps.changed-files.outputs.has_changes == 'false'
|
if: steps.changed-files.outputs.has_changes == 'false'
|
||||||
run: echo "No Python files in src/ or tests/ were modified - skipping type checks"
|
run: echo "No Python files in src/ were modified - skipping type checks"
|
||||||
|
|
||||||
# Summary job to provide single status for branch protection
|
# Summary job to provide single status for branch protection
|
||||||
type-checker:
|
type-checker:
|
||||||
|
|||||||
@@ -122,8 +122,7 @@ select = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
strict = true
|
exclude = ["src/crewai/cli/templates", "tests"]
|
||||||
exclude = ["src/crewai/cli/templates"]
|
|
||||||
|
|
||||||
[tool.bandit]
|
[tool.bandit]
|
||||||
exclude_dirs = ["src/crewai/cli/templates"]
|
exclude_dirs = ["src/crewai/cli/templates"]
|
||||||
|
|||||||
Reference in New Issue
Block a user