name: Linters

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  ruff:
    name: ruff
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Python 3.x
        uses: actions/setup-python@v5
        with:
          python-version: "3.13"
      - run: python -m pip install tox
      - name: tox ruff
        run: tox
        env:
          TOXENV: ruff

  mypy:
    name: mypy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Python 3.x
        uses: actions/setup-python@v5
        with:
          python-version: "3.13"
      - run: python -m pip install tox
      - name: tox mypy
        run: tox
        env:
          TOXENV: mypy
