Merge pull request #340 from AbanteAI/mentat-264 #944
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: Format and Lint | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| format-and-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv and Setup Python Environment | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| export PATH="$HOME/.cargo/bin:$PATH" | |
| uv python install 3.12.3 | |
| uv venv --python 3.12.3 | |
| # Activate venv for this step to install into it | |
| source .venv/bin/activate | |
| uv pip install -r requirements.txt | |
| echo "Python version in venv:" | |
| python --version | |
| echo "Ruff version in venv:" | |
| ruff --version | |
| echo "Pyright version in venv:" | |
| pyright --version | |
| - name: Run ruff formatter | |
| run: | | |
| export PATH="$HOME/.cargo/bin:$PATH" | |
| source .venv/bin/activate | |
| echo "Running ruff format check..." | |
| ruff format --check . | |
| - name: Run ruff linter | |
| run: | | |
| export PATH="$HOME/.cargo/bin:$PATH" | |
| source .venv/bin/activate | |
| echo "Running ruff lint check..." | |
| ruff check . | |
| - name: Run type checking with pyright | |
| run: | | |
| export PATH="$HOME/.cargo/bin:$PATH" | |
| source .venv/bin/activate | |
| echo "Running pyright type check..." | |
| pyright . # Check the whole project |