Skip to content

Commit d37dadb

Browse files
ci: added conventional commits
1 parent af6242b commit d37dadb

File tree

4 files changed

+141
-3
lines changed

4 files changed

+141
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
3434
- name: Run pre-commit
3535
run: |
36-
pre-commit install
36+
commitlint --from=origin/${{ github.event.pull_request.base.ref }} --to=origin/${{ github.event.pull_request.head.ref }}
3737
pre-commit run --all-files
3838
3939
tests:

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,46 @@ repos:
66
entry: bash -c "cd python_coderunner && ruff check ."
77
language: system
88
types: [python]
9+
stages: [pre-commit]
10+
verbose: true
911

1012
- id: ruff_format
1113
name: ruff_format
1214
# not in args, because entry is bash
1315
entry: bash -c "cd python_coderunner && ruff format --quiet ."
1416
language: system
1517
types: [python]
18+
stages: [pre-commit]
19+
verbose: true
1620

1721
- id: isort
1822
name: isort
1923
entry: bash -c "cd python_coderunner && isort ."
2024
language: system
2125
types: [python]
26+
stages: [pre-commit]
27+
verbose: true
2228

2329
- id: mypy
2430
name: mypy
2531
entry: bash -c "cd python_coderunner && mypy ."
2632
language: system
2733
types: [python]
34+
stages: [pre-commit]
35+
verbose: true
2836

2937
- id: pylint
3038
name: pylint
3139
entry: bash -c "cd python_coderunner && pylint ."
3240
language: system
3341
types: [python]
42+
stages: [pre-commit]
43+
verbose: true
44+
45+
- id: commitlint
46+
name: commitlint
47+
entry: commitlint
48+
args: [--file]
49+
language: system
50+
stages: [commit-msg]
51+
verbose: true

python_coderunner/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ requires-python = ">=3.10"
88

99
[dependency-groups]
1010
dev = [
11+
"commitlint>=1.3.0",
1112
"isort>=4.3.21",
1213
"mypy>=0.910",
1314
"pre-commit>=1.21.0",

0 commit comments

Comments
 (0)