name: Pylint

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

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

    defaults:
      run:
        shell: bash

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.11"

      - name: Run Pylint
        run: ./src/scripts/lint.sh -i