File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -29,18 +29,16 @@ jobs:
29
29
- name : Install Pip dependencies
30
30
run : pip install -r requirements.txt
31
31
32
+ # Run black to reformat the code automatically
32
33
- name : Reformat code with black
33
34
run : black .
34
35
35
- - name : Commit and push if code was reformatted
36
+ # Optionally commit and push changes if reformatting is done
37
+ - name : Commit and push changes if reformatted
36
38
run : |
37
39
git config --local user.email "actions@github.com"
38
40
git config --local user.name "GitHub Actions"
39
- git diff --exit-code || (git add . && git commit -m "Reformat code with black" && git push)
40
- # This step will commit and push the reformatted code if changes were made
41
-
42
- - name : Check formatting with black
43
- run : black --check .
41
+ git diff --exit-code || (git add . && git commit -m "Reformatted code with black" && git push)
44
42
45
43
- name : Run Tests
46
44
run : pytest
49
47
run : python pipeline.py
50
48
51
49
50
+
You can’t perform that action at this time.
0 commit comments