File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 branches : ["**"]
88
99jobs :
10- lint :
11- name : Formatting ( Black)
10+ format :
11+ name : Auto-format (isort + Black)
1212 runs-on : ubuntu-latest
13+ if : github.event_name == 'push'
14+
15+ permissions :
16+ contents : write
1317
1418 steps :
1519 - uses : actions/checkout@v4
20+ with :
21+ ref : ${{ github.head_ref || github.ref }}
1622
1723 - name : Set up Python 3.13
1824 uses : actions/setup-python@v5
@@ -24,11 +30,16 @@ jobs:
2430 python -m pip install --upgrade pip
2531 pip install -e ".[dev]"
2632
27- - name : Check import ordering with isort
28- run : isort --check-only --diff src/ tests/
33+ - name : Run isort
34+ run : isort src/ tests/
2935
30- - name : Check formatting with Black
31- run : black --check src/ tests/
36+ - name : Run Black
37+ run : black src/ tests/
38+
39+ - name : Commit formatting changes
40+ uses : stefanzweifel/git-auto-commit-action@v5
41+ with :
42+ commit_message : " style: auto-format with isort + Black [skip ci]"
3243
3344 test :
3445 name : Tests
You can’t perform that action at this time.
0 commit comments