Skip to content

Commit 60abd72

Browse files
authored
Merge pull request #25 from SFI-Visual-Intelligence/christian/format-gh-action
Instead of formatting changes, fail the test if code needs formatting
2 parents 3f79234 + 4159b78 commit 60abd72

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

.github/workflows/format.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@ name: Format
22

33
on:
44
push:
5-
branches:
6-
- main
75
paths:
86
- 'utils/**'
97
pull_request:
10-
branches:
11-
- main
128
paths:
139
- 'utils/**'
1410

@@ -30,18 +26,10 @@ jobs:
3026
run: |
3127
pip install ruff isort
3228
33-
- name: Run Ruff formatter
29+
- name: Run Ruff check
3430
run: |
35-
ruff format utils/
31+
ruff check utils/
3632
37-
- name: Run isort
33+
- name: Run isort check
3834
run: |
39-
isort utils/
40-
41-
- name: Commit and push changes
42-
run: |
43-
git config --global user.name "github-actions[bot]"
44-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
45-
git add utils/
46-
git commit -m "Auto-format: Applied ruff format and isort" || exit 0
47-
git push
35+
isort --check-only utils/

0 commit comments

Comments
 (0)