From b98e0202ec38682b1f1b646eda1b09c9b8c38689 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:30:09 +0530 Subject: T6678: files listing approach updated --- .github/workflows/ruff-lint.yml | 18 +++++++++--------- src/tests/test.py | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ruff-lint.yml b/.github/workflows/ruff-lint.yml index e875dea..499a971 100644 --- a/.github/workflows/ruff-lint.yml +++ b/.github/workflows/ruff-lint.yml @@ -21,17 +21,17 @@ jobs: id: py-filter uses: dorny/paths-filter@v3 with: - list-files: json + list-files: shell filters: | python: - '**/*.py' - - name: Get py changed files - if: steps.py-filter.outputs.python == 'true' - id: py-changed-files - run: | - files=$(echo '${{ steps.py-filter.outputs.python_files }}' | jq -r 'join(" ")') - echo "files=${files}" >> $GITHUB_OUTPUT + # - name: Get py changed files + # if: steps.py-filter.outputs.python == 'true' + # id: py-changed-files + # run: | + # files=$(echo '${{ steps.py-filter.outputs.python_files }}' | jq -r 'join(" ")') + # echo "files=${files}" >> $GITHUB_OUTPUT - name: Install ruff if: steps.py-filter.outputs.python == 'true' @@ -41,9 +41,9 @@ jobs: - name: Run ruff check on changed files if: steps.py-filter.outputs.python == 'true' run: | - ruff check ${{ steps.py-changed-files.outputs.files }} + ruff check ${{ steps.py-filter.outputs.python_files }} - name: Run ruff format on changed files if: always() && steps.py-filter.outputs.python == 'true' run: | - ruff format --diff ${{ steps.py-changed-files.outputs.files }} \ No newline at end of file + ruff format --diff ${{ steps.py-filter.outputs.python_files }} \ No newline at end of file diff --git a/src/tests/test.py b/src/tests/test.py index 46803bd..f64dac9 100644 --- a/src/tests/test.py +++ b/src/tests/test.py @@ -1,6 +1,7 @@ from typing import List import os +import json def sum_even_numbers(numbers: List[int]) -> int: """Given a list of integers, return the sum of all even numbers in the list.""" -- cgit v1.2.3