Skip to content

Commit 8f74e3a

Browse files
authored
cicd(python): refine precommit check (#70)
1 parent 752536b commit 8f74e3a

File tree

1 file changed

+11
-11
lines changed
  • python/{{cookiecutter.project_slug}}/.github/workflows

1 file changed

+11
-11
lines changed

python/{{cookiecutter.project_slug}}/.github/workflows/checks.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ jobs:
4343
runs-on: ubuntu-latest
4444
strategy:
4545
matrix:
46-
hook:
47-
- name: "Check EOF format"
48-
args: "end-of-file-fixer --all-files"
49-
- name: "Check trailing whitespace"
50-
args: "trailing-whitespace --all-files"
51-
- name: "Check line ending format"
52-
args: "mixed-line-ending --fix=lf --all-files"
46+
- cmd: "end-of-file-fixer"
47+
- cmd: "trailing-whitespace"
48+
- cmd: "mixed-line-ending"
5349
steps:
54-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
51+
52+
- name: Set up Python 3.12
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: 3.12
5556

56-
- name: {{ "${{ matrix.hook.name }}" }}
57-
uses: pre-commit/[email protected]
57+
- uses: pre-commit/[email protected]
5858
with:
59-
extra_args: {{ "${{ matrix.hook.args }}" }}
59+
extra_args: {{ "${{ matrix.cmd }}" }} --all-files
6060

6161
{% if cookiecutter.add_docs %}
6262
docs:

0 commit comments

Comments
 (0)