Skip to content

Commit

Permalink
update Github action for checking python files
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed Dec 29, 2024
1 parent a8cc53b commit 001db96
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/Ruff_python_formater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Get Python changed files
id: changed-py-files
uses: tj-actions/changed-files@v45
with:
files: |
*.py
**/*.py
- name: Install dependencies
if: steps.changed-py-files.outputs.any_changed == 'true'
run: |
python -m pip install --upgrade pip
pip install ruff isort
# Update output format to enable automatic inline annotations.
- name: Run Ruff
if: steps.changed-py-files.outputs.any_changed == 'true'
run: |
ruff check --output-format=github *.py
ruff check --output-format=github ${{ steps.changed-py-files.outputs.all_changed_files }}
isort .

0 comments on commit 001db96

Please sign in to comment.