Skip to content

Commit 6659a69

Browse files
committed
ci(travis): include commitlint stage
* https://github.com/conventional-changelog/commitlint - Lint commit messages. - Ensure that they are in accordance with `semantic-release` settings. - Use Travis CI to display errors and prevent release stage if so. * https://conventional-changelog.github.io/commitlint/#/reference-rules - Specific rules are defined in `commitlint.config.js`. - Using the default rules at the time of this commit. - This link gives full details on the default values and how to provide custom settings.
1 parent 8fca3a9 commit 6659a69

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.travis.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
stages:
2+
- test
3+
- commitlint
4+
- name: release
5+
if: branch = master
6+
17
sudo: required
28
cache: bundler
39
language: ruby
@@ -22,9 +28,16 @@ before_deploy:
2228
- test $TRAVIS_TEST_RESULT = 0
2329

2430
jobs:
25-
# Only run if this is the `master` branch
26-
if: branch = master
2731
include:
32+
# Define the commitlint stage
33+
- stage: commitlint
34+
language: node_js
35+
node_js: lts/*
36+
before_install: skip
37+
script:
38+
- npm install @commitlint/config-conventional -D
39+
- npm install @commitlint/travis-cli -D
40+
- commitlint-travis
2841
# Define the release stage that runs semantic-release
2942
- stage: release
3043
language: node_js

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
};

0 commit comments

Comments
 (0)