-
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.
cicd(python): run precommit hooks in CI (#61)
- Loading branch information
1 parent
02ac81d
commit b618d74
Showing
1 changed file
with
19 additions
and
0 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 |
---|---|---|
|
@@ -39,6 +39,25 @@ jobs: | |
- name: Check style | ||
run: python3 -m ruff check . && python3 -m ruff format --check . | ||
|
||
precommit_hooks: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
hook: | ||
- name: "Check EOF format" | ||
args: "end-of-file-fixer --all-files" | ||
- name: "Check trailing whitespace" | ||
args: "trailing-whitespace --all-files" | ||
- name: "Check line ending format" | ||
args: "mixed-line-ending --fix=lf --all-files" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: {{ "${{ matrix.hook.name }}" }} | ||
uses: pre-commit/[email protected] | ||
with: | ||
extra_args: {{ "${{ matrix.hook.args }}" }} | ||
|
||
{% if cookiecutter.add_docs %} | ||
docs: | ||
runs-on: ubuntu-latest | ||
|