name: PyLint on: workflow_dispatch: push: branches: [master, main] paths: ['web/documentserver-example/python/**'] pull_request: branches: [master, main, develop] paths: ['web/documentserver-example/python/**'] jobs: lint: runs-on: ubuntu-latest defaults: run: working-directory: ./web/documentserver-example/python steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.10' - name: Install Dependencies run: | python -m pip install --upgrade pip pip install flake8 pip install pylint if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint Flake8 run: | flake8 --count --select=E9,F63,F7,F82 --show-source --statistics flake8 --count --max-complexity=15 --max-line-length=120 --per-file-ignores="__init__.py:F4" --statistics - name: Lint Pylint run: | pylint ./**/*.py --rcfile=.pylintrc --disable=import-error