format code #1334
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: Lint Code | |
| on: | |
| push: | |
| branches: [ dev, main ] | |
| pull_request: | |
| branches: [ dev ] | |
| jobs: | |
| lint_code: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.12" | |
| steps: | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| ~/.local/bin/uv sync --all-extras | |
| - name: Lint with ruff | |
| run: | | |
| ~/.local/bin/uv run ruff check aiutil/ tests/ | |
| - name: Lint with pytype | |
| run: | | |
| ~/.local/bin/uv run pytype ./ | |
| - name: Check code format | |
| run: | | |
| ~/.local/bin/uv run ruff format --check . |