Skip to content

Commit a10ee19

Browse files
committed
feat(ci): added commit linting
1 parent a0030f8 commit a10ee19

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

.github/workflows/_commit_msg.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: commit-lint
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Code
11+
uses: actions/checkout@v6
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Lint Commit Messages
16+
uses: wagoid/commitlint-github-action@v6.2.1
17+
with:
18+
failonWarnings: true

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ on:
55
branches:
66
- main
77
tags:
8-
- '*'
8+
- "*"
99
pull_request:
1010

1111
jobs:
12-
1312
lint:
1413
uses: ./.github/workflows/_tox.yml
1514
with:
1615
tox: pre-commit,type-checking
1716

17+
commit-lint:
18+
uses: ./.github/workflows/_commit_msg.yml
19+
1820
test:
1921
strategy:
2022
matrix:
@@ -38,7 +40,7 @@ jobs:
3840

3941
dist:
4042
uses: ./.github/workflows/_dist.yml
41-
43+
4244
release:
4345
needs: [dist, test]
4446
if: github.ref_type == 'tag'

0 commit comments

Comments
 (0)