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.
- Loading branch information
1 parent
150422e
commit 22386a0
Showing
2 changed files
with
30 additions
and
40 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,10 +1,35 @@ | ||
name: Ruff | ||
name: Run Ruff on Changed Files | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
ruff: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 | ||
- 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 | ||
env: | ||
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | ||
run: | | ||
# for file in ${ALL_CHANGED_FILES}; do | ||
# echo "$file was changed" | ||
# done | ||
ruff check ${ALL_CHANGED_FILES} | ||