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 ac2d758
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 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,22 @@ jobs:
- name: Install dependencies
run: pnpm install

- 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 ac2d758

Please sign in to comment.