name: Lint

on: push

jobs:
  run-linters:
    name: Run linters
    runs-on: ubuntu-latest

    steps:
      - name: Check out Git repository
        uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.x"

      - name: Install Python dependencies
        run: python -m pip install black flake8

      - name: Run linters
        uses: wearerequired/lint-action@v2
        with:
          github_token: ${{ secrets.github_token }}
          # Enable linters
          black: true
          black_args: "-l 99 --diff --color --extend-exclude .ipynb"
          flake8: true
          flake8_args: "--max-line-length=99 --extend-ignore=E203,E501"
