mirror of
https://github.com/saltstack-formulas/template-formula.git
synced 2025-04-17 10:10:28 +00:00
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.
This commit is contained in:
parent
8fca3a9e32
commit
6659a695d1
2 changed files with 18 additions and 2 deletions
17
.travis.yml
17
.travis.yml
|
@ -1,3 +1,9 @@
|
|||
stages:
|
||||
- test
|
||||
- commitlint
|
||||
- name: release
|
||||
if: branch = master
|
||||
|
||||
sudo: required
|
||||
cache: bundler
|
||||
language: ruby
|
||||
|
@ -22,9 +28,16 @@ before_deploy:
|
|||
- test $TRAVIS_TEST_RESULT = 0
|
||||
|
||||
jobs:
|
||||
# Only run if this is the `master` branch
|
||||
if: branch = master
|
||||
include:
|
||||
# Define the commitlint stage
|
||||
- stage: commitlint
|
||||
language: node_js
|
||||
node_js: lts/*
|
||||
before_install: skip
|
||||
script:
|
||||
- npm install @commitlint/config-conventional -D
|
||||
- npm install @commitlint/travis-cli -D
|
||||
- commitlint-travis
|
||||
# Define the release stage that runs semantic-release
|
||||
- stage: release
|
||||
language: node_js
|
||||
|
|
3
commitlint.config.js
Normal file
3
commitlint.config.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
};
|
Loading…
Add table
Reference in a new issue