Skip to content

Commit

Permalink
Add GitHub Actions workflow for running Ruff on changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Jun 29, 2024
1 parent 90d77a2 commit 2906376
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/changed_rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run Ruff on Changed Files

on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Get all commits

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: '**/*.py' # Adjust pattern for your file types

- name: Setup Python environment
uses: actions/setup-python@v3

- name: Install Ruff
run: pip install ruff

- name: Run Ruff on changed files
run: |
ruff check ${{ steps.changed-files.outputs.all_changed_files }}

0 comments on commit 2906376

Please sign in to comment.