mirror of
https://github.com/saltstack-formulas/template-formula.git
synced 2025-04-17 10:10:28 +00:00
ci(travis): run linters using pre-commit
This commit is contained in:
parent
c78c06876e
commit
6da26cca6a
2 changed files with 15 additions and 3 deletions
|
@ -5,13 +5,18 @@
|
|||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
default_stages: [commit]
|
||||
repos:
|
||||
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
||||
rev: v2.2.3
|
||||
- repo: https://github.com/dafyddj/commitlint-pre-commit-hook
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: commitlint
|
||||
name: Check commit message against @commitlint/config-conventional rules
|
||||
name: Check commit message using commitlint
|
||||
description: Lint commit message against @commitlint/config-conventional rules
|
||||
stages: [commit-msg]
|
||||
additional_dependencies: ['@commitlint/config-conventional@8.3.4']
|
||||
- id: commitlint-travis
|
||||
stages: [manual]
|
||||
additional_dependencies: ['@commitlint/config-conventional@8.3.4']
|
||||
always_run: true
|
||||
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
||||
rev: 2.1.3
|
||||
hooks:
|
||||
|
|
|
@ -31,6 +31,9 @@ jobs:
|
|||
# Run all of the linters in a single job
|
||||
- language: 'node_js'
|
||||
node_js: 'lts/*'
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/pre-commit
|
||||
env: 'Lint'
|
||||
name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint'
|
||||
before_install: 'skip'
|
||||
|
@ -54,6 +57,10 @@ jobs:
|
|||
- npm i -D @commitlint/config-conventional
|
||||
@commitlint/travis-cli
|
||||
- commitlint-travis
|
||||
# Install and run `pre-commit`
|
||||
- pip install pre-commit
|
||||
- pre-commit run --all-files --verbose
|
||||
- pre-commit run --hook-stage manual --verbose commitlint-travis
|
||||
|
||||
## Define the rest of the matrix based on Kitchen testing
|
||||
# Make sure the instances listed below match up with
|
||||
|
|
Loading…
Add table
Reference in a new issue