Skip to content

Commit

Permalink
ci: added commitlint check
Browse files Browse the repository at this point in the history
  • Loading branch information
r34son committed Oct 14, 2023
1 parent 0773d01 commit 09e02ea
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
branches: ['master']

jobs:
unit:
validate:
name: Validate
runs-on: ubuntu-latest

steps:
Expand All @@ -26,6 +27,27 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Log repository information
run: |
git config --get remote.origin.url
git log -n 5
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: |
pnpm exec commitlint \
--from ${{ github.event.before }} \
--to ${{ github.event.after }} \
--verbose
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: |
pnpm exec commitlint \
--from ${{ github.event.pull_request.base.sha }} \
--to ${{ github.event.pull_request.head.sha }} \
--verbose
- name: Run the tests and generate coverage report
run: pnpm test -- --coverage

Expand Down

0 comments on commit 09e02ea

Please sign in to comment.