
name: "Checks"


on:
  workflow_dispatch:
  push:
    branches:
      - main
    paths:
      - 'rare/**'
  pull_request:
    types:
      - opened
      - reopened
      - synchronize
    branches:
      - main
    paths:
      - 'rare/**'


jobs:
  pylint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.9'
      - name: Install Test Dependencies
        run: |
          python -m pip install --upgrade pip
          pip install pylint
      - name: Install Target Dependencies
        run: |
          pip3 install -r requirements.txt
          pip3 install -r requirements-presence.txt
      - name: Analysis with pylint
        run: |
          pylint -E rare --disable=E0611,E1123,E1120 --ignore=ui,singleton.py --extension-pkg-whitelist=PyQt5
