name: Ruff Format

on:
  pull_request:
    branches: [ main ]
  push:
    branches: [ main ]

jobs:
  ruff-format:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-python@v5
      with:
        python-version: '3.11'
    - name: Install uv
      uses: astral-sh/setup-uv@v4
    - name: Install dependencies
      run: uv sync
    - name: Run ruff format check
      run: uv run ruff format --check
