mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
* feat: add capability to see and expose public Tool classes * feat: persist available Tools from repository on publish * ci: ignore explictly templates from ruff check Ruff only applies --exclude to files it discovers itself. So we have to skip manually the same files excluded from `ruff.toml` * sytle: fix linter issues * refactor: renaming available_tools_classes by available_exports * feat: provide more context about exportable tools * feat: allow to install a Tool from pypi * test: fix tests * feat: add env_vars attribute to BaseTool * remove TODO: security check since we are handle that on enterprise side
37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
name: Lint
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Fetch Target Branch
|
|
run: git fetch origin $TARGET_BRANCH --depth=1
|
|
|
|
- name: Install Ruff
|
|
run: pip install ruff
|
|
|
|
- name: Get Changed Python Files
|
|
id: changed-files
|
|
run: |
|
|
merge_base=$(git merge-base origin/"$TARGET_BRANCH" HEAD)
|
|
changed_files=$(git diff --name-only --diff-filter=ACMRTUB "$merge_base" | grep '\.py$' || true)
|
|
echo "files<<EOF" >> $GITHUB_OUTPUT
|
|
echo "$changed_files" >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
|
|
- name: Run Ruff on Changed Files
|
|
if: ${{ steps.changed-files.outputs.files != '' }}
|
|
run: |
|
|
echo "${{ steps.changed-files.outputs.files }}" \
|
|
| tr ' ' '\n' \
|
|
| grep -v 'src/crewai/cli/templates/' \
|
|
| xargs -I{} ruff check "{}"
|