Skip to content

Commit a03f5c8

Browse files
authored
Update pipeline.yaml
1 parent 632603e commit a03f5c8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/pipeline.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,16 @@ jobs:
2929
- name: Install Pip dependencies
3030
run: pip install -r requirements.txt
3131

32+
# Run black to reformat the code automatically
3233
- name: Reformat code with black
3334
run: black .
3435

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
3638
run: |
3739
git config --local user.email "actions@github.com"
3840
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)
4442
4543
- name: Run Tests
4644
run: pytest
@@ -49,3 +47,4 @@ jobs:
4947
run: python pipeline.py
5048

5149

50+

0 commit comments

Comments
 (0)