eigent/.github/workflows/pre-commit.yml
Dream ce782762e8
chore: upgrade backend Python to 3.11 (#1142)
Co-authored-by: Wendong-Fan <w3ndong.fan@gmail.com>
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
2026-02-05 05:24:52 +08:00

60 lines
1.6 KiB
YAML

name: Pre-commit
"on":
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install dev dependencies
run: uv sync --group dev
- name: Run pre-commit
run: |
uv run pre-commit run --files \
$(find \
app/agent \
app/controller \
app/exception \
app/middleware \
app/model \
app/service \
tests/app \
-type f ! -path '*__pycache__*') \
app/__init__.py \
app/router.py \
app/component/__init__.py \
app/component/pydantic/__init__.py \
app/utils/listen/__init__.py \
app/utils/server/__init__.py \
app/utils/toolkit/__init__.py \
app/utils/toolkit/google_calendar_toolkit.py \
app/utils/toolkit/google_gmail_mcp_toolkit.py \
app/utils/toolkit/linkedin_toolkit.py \
app/utils/toolkit/reddit_toolkit.py \
app/utils/toolkit/slack_toolkit.py \
app/utils/toolkit/twitter_toolkit.py \
app/utils/toolkit/whatsapp_toolkit.py \
tests/conftest.py
env:
SKIP: no-commit-to-branch