name: Linting
on: [push, pull_request]
jobs:
  pre-commit:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-python@v5
      with:
        python-version: "3.12"
    - uses: pre-commit/action@v3.0.1
      env:
        SKIP: black,ruff,mypy,no-commit-to-branch
  black:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - uses: psf/black@stable
        with:
          version: "24.4.2"
  ruff:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: chartboost/ruff-action@v1
        with:
          version: "0.0.292"
  mypy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: jpetrucciani/mypy-check@1.14.1
        with:
          python_version: "3.12"
          mypy_flags: '--config-file pyproject.toml --ignore-missing-imports --scripts-are-modules'
          requirements: "types-setuptools"
