Skip to content

Commit

Permalink
ci: add commitlint job to ci (renamed from test) workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tsufiev committed Dec 23, 2021
1 parent c154f7f commit 4705246
Show file tree
Hide file tree
Showing 5 changed files with 686 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ on:
branches: [ '**' ]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- run: npm ci
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

test:
runs-on: ubuntu-latest

Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']}
Loading

0 comments on commit 4705246

Please sign in to comment.