This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: explicity execute pre-commit in CI on PRs (#47)
* CI: explicity execute pre-commit in CI on PRs * CI: Fix outstanding pre-commit violations
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
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,25 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
run-pre-commit: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- name: Run pre-commit | ||
run: pre-commit run --all-files | ||
|
||
- name: Fail on diff after pre-commit is run | ||
run: git diff --exit-code |
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