Skip to content

Commit

Permalink
Update pipeline.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
devlinwaluja authored Oct 2, 2024
1 parent 632603e commit a03f5c8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -49,3 +47,4 @@ jobs:
run: python pipeline.py



0 comments on commit a03f5c8

Please sign in to comment.