summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijayakumar A <36878324+kumvijaya@users.noreply.github.com>2024-09-14 15:30:09 +0530
committerGitHub <noreply@github.com>2024-09-14 15:30:09 +0530
commitb98e0202ec38682b1f1b646eda1b09c9b8c38689 (patch)
tree8477207b1196925d193f9187f9990c1f3f889144
parentf5fb2b55a8fa794959a37ccc745b87735b05b572 (diff)
downloadvyos-workflow-test-temp-b98e0202ec38682b1f1b646eda1b09c9b8c38689.tar.gz
vyos-workflow-test-temp-b98e0202ec38682b1f1b646eda1b09c9b8c38689.zip
T6678: files listing approach updated
-rw-r--r--.github/workflows/ruff-lint.yml18
-rw-r--r--src/tests/test.py1
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."""