Skip to content

Commit

Permalink
trying to add ruff only on changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Jun 27, 2024
1 parent bcbe191 commit b88c5b8
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
name: Ruff
# name: Ruff
# on: [ push, pull_request ]
# jobs:
# ruff:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: chartboost/ruff-action@v1
name: Ruff on Changed Files

on: [ push, pull_request ]

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- uses: tj-actions/changed-files@v35 # Identify changed files
id: changed_files
- name: Run Ruff only on changes (optional)
run: |
if [[ $(echo ${{ steps.changed_files.outputs.all_changed_files }} | grep -q ".") ]]; then
# Use ruff-action with `--check` flag here
uses: chartboost/ruff-action@v1 with: args: --check
fi

0 comments on commit b88c5b8

Please sign in to comment.