refactor: Migrate from poetry to astral uv #2
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: Python Linters | |
on: [workflow_dispatch, pull_request] | |
jobs: | |
mypy: | |
name: MyPy Python linter | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install mypy | |
run: pip install mypy | |
- name: Run mypy | |
uses: sasanquaneuf/mypy-github-action@releases/v1.3 | |
with: | |
checkName: "mypy" # NOTE: this needs to be the same as the job name | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ruff: | |
needs: mypy | |
name: Ruff Python Linter | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Ruff Check | |
uses: astral-sh/ruff-action@v3 | |
with: | |
args: "check --config pyproject.toml" | |
- name: Ruff Format | |
uses: astral-sh/ruff-action@v3 | |
with: | |
args: "format --check --config pyproject.toml" |