From f5fb2b55a8fa794959a37ccc745b87735b05b572 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:33:35 +0530 Subject: T6678: no change in py --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3 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 From 068a5b0b16afe7f504b43f765c32c30214f11c5a Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:33:02 +0530 Subject: T6678: files listing approach updated --- src/tests/test_config_parser.py | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3 From 05f4b8eb2967e98e7988aceee4f57aded56a7027 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:35:02 +0530 Subject: T6678: files listing approach updated --- .github/workflows/ruff-lint.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/ruff-lint.yml b/.github/workflows/ruff-lint.yml index 499a971..a9e82be 100644 --- a/.github/workflows/ruff-lint.yml +++ b/.github/workflows/ruff-lint.yml @@ -26,13 +26,6 @@ jobs: 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: | -- cgit v1.2.3