diff --git a/.github/workflows/ruff-lint.yml b/.github/workflows/ruff-lint.yml index e875dea..a9e82be 100644 --- a/.github/workflows/ruff-lint.yml +++ b/.github/workflows/ruff-lint.yml @@ -21,18 +21,11 @@ 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: Install ruff if: steps.py-filter.outputs.python == 'true' run: | @@ -41,9 +34,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/README.md b/README.md index 779d41d..06b06ef 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Validates the common reusable github action workflows -## Package layout for validation and tests. Test 1 +## Package layout for validation and tests. Test 2 ``` data # Jinja2 templates 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.""" diff --git a/src/tests/test_config_parser.py b/src/tests/test_config_parser.py index 8016feb..def278f 100644 --- a/src/tests/test_config_parser.py +++ b/src/tests/test_config_parser.py @@ -15,6 +15,7 @@ # along with this program. If not, see . import vyos.configtree +import json from unittest import TestCase