Skip to content

Commit

Permalink
T6678: files listing approach updated
Browse files Browse the repository at this point in the history
  • Loading branch information
kumvijaya authored Sep 14, 2024
1 parent f5fb2b5 commit b98e020
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ruff-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 }}
ruff format --diff ${{ steps.py-filter.outputs.python_files }}
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

0 comments on commit b98e020

Please sign in to comment.