forked from py4dstem/py4DSTEM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to add ruff only on changed files
- Loading branch information
1 parent
bcbe191
commit b88c5b8
Showing
1 changed file
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |