-
Notifications
You must be signed in to change notification settings - Fork 1
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
632603e
commit a03f5c8
Showing
1 changed file
with
5 additions
and
6 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -29,18 +29,16 @@ jobs: | |
- name: Install Pip dependencies | ||
run: pip install -r requirements.txt | ||
|
||
# Run black to reformat the code automatically | ||
- name: Reformat code with black | ||
run: black . | ||
|
||
- name: Commit and push if code was reformatted | ||
# Optionally commit and push changes if reformatting is done | ||
- name: Commit and push changes if reformatted | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
git diff --exit-code || (git add . && git commit -m "Reformat code with black" && git push) | ||
# This step will commit and push the reformatted code if changes were made | ||
|
||
- name: Check formatting with black | ||
run: black --check . | ||
git diff --exit-code || (git add . && git commit -m "Reformatted code with black" && git push) | ||
- name: Run Tests | ||
run: pytest | ||
|
@@ -49,3 +47,4 @@ jobs: | |
run: python pipeline.py | ||
|
||
|
||
|