feat: 添加 ruff + mypy CI 检查 (Issue #13) #3
Workflow file for this run
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: Test & Lint | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| - name: Install dependencies | |
| run: | | |
| pip install pytest pytest-mock ruff mypy types-requests | |
| - name: Run tests | |
| run: | | |
| pytest tests/ -q | |
| - name: Ruff lint | |
| run: | | |
| ruff check agent_go/ --select=E,F --ignore=E501 --fix || true | |
| - name: MyPy type check | |
| run: | | |
| mypy agent_go/ --ignore-missing-imports || true |