From 69cc7e34d7db1d562c167a1dde3b3c46a06cc794 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 24 Dec 2024 11:34:28 +0200 Subject: [PATCH] Update the isort workflow to check everything --- .github/workflows/isort.yml | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/.github/workflows/isort.yml b/.github/workflows/isort.yml index bf90604cbb2f..620dc6c85d79 100644 --- a/.github/workflows/isort.yml +++ b/.github/workflows/isort.yml @@ -5,35 +5,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - id: files - uses: tj-actions/changed-files@v41.0.0 - with: - files: | - cvat-sdk/**/*.py - cvat-cli/**/*.py - tests/python/**/*.py - cvat/apps/quality_control/**/*.py - cvat/apps/analytics_report/**/*.py - dir_names: true - name: Run checks run: | - # If different modules use different isort configs, - # we need to run isort for each python component group separately. - # Otherwise, they all will use the same config. + pipx install $(grep "^isort" ./dev/requirements.txt) - UPDATED_DIRS="${{steps.files.outputs.all_changed_files}}" + echo "isort version: $(isort --version-number)" - if [[ ! -z $UPDATED_DIRS ]]; then - pipx install $(grep "^isort" ./dev/requirements.txt) - - echo "isort version: $(isort --version-number)" - echo "The dirs will be checked: $UPDATED_DIRS" - EXIT_CODE=0 - for DIR in $UPDATED_DIRS; do - isort --check $DIR || EXIT_CODE=$(($? | $EXIT_CODE)) || true - done - exit $EXIT_CODE - else - echo "No files with the \"py\" extension found" - fi + isort --check --diff --resolve-all-configs .