Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T6678: no change in py #56

Merged
merged 4 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .github/workflows/ruff-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}
ruff format --diff ${{ steps.py-filter.outputs.python_files }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/tests/test.py
Original file line number Diff line number Diff line change
@@ -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."""
Expand Down
1 change: 1 addition & 0 deletions src/tests/test_config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import vyos.configtree
import json

from unittest import TestCase

Expand Down
Loading