Revision 1b197e4dc6cef0ea09a9ed817a36f5decb778c58 authored by Roman Donchenko on 26 October 2023, 06:39:29 UTC, committed by GitHub on 26 October 2023, 06:39:29 UTC
The job spends about a minute downloading and loading the CVAT server
image, but I don't think it's used at all.
1 parent c19ea38
Raw File
pylint.yml
name: Pylint
on: pull_request
jobs:
  Linter:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - id: files
        uses: tj-actions/changed-files@v35.9.2
        with:
          files: |
              **/*.py

      - name: Run checks
        env:
          PR_FILES_AM: ${{ steps.files.outputs.added_modified }}
          PR_FILES_RENAMED: ${{ steps.files.outputs.renamed }}
        run: |
          CHANGED_FILES="${{steps.files.outputs.all_changed_files}}"

          if [[ ! -z $CHANGED_FILES ]]; then
            pipx install $(egrep "^pylint==" ./cvat/requirements/development.txt)

            pipx inject pylint \
              $(egrep "^pylint-.+==" ./cvat/requirements/development.txt) \
              $(egrep "^django==" ./cvat/requirements/base.txt)

            echo "Pylint version: "$(pylint --version | head -1)
            echo "The files will be checked: "$(echo $CHANGED_FILES)
            pylint $CHANGED_FILES
          else
            echo "No files with the \"py\" extension found"
          fi
back to top