-
Notifications
You must be signed in to change notification settings - Fork 0
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
f52c6ac
commit 61ad15e
Showing
3 changed files
with
181 additions
and
92 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Pre-commit checks | ||
|
||
on: [push, pull_request] # Runs on push or pull request events | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v3 # Check out the code from the repository | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 # Set up Python environment | ||
with: | ||
python-version: '3.x' # Set to your required Python version (e.g., '3.9') | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pre-commit black | ||
- name: Run pre-commit hooks | ||
run: pre-commit run --all-files # Run pre-commit on all files | ||
|
||
- name: Auto-format code with Black | ||
run: black . | ||
|
Oops, something went wrong.