Pre-commit hooks (#125)
* feat: pre-commit * empty * fix: requirements.txt
This commit is contained in:
parent
45ddd65e74
commit
4f3b8ec9e0
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -12,3 +12,4 @@
|
||||
- [ ] Ran `reset.yml` playbook
|
||||
- [ ] Did not add any unnecessary changes
|
||||
- [ ] 🚀
|
||||
- [ ] Ran pre-commit install at least once before committing
|
||||
|
||||
11
.github/workflows/lint.yml
vendored
11
.github/workflows/lint.yml
vendored
@ -7,8 +7,8 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
ansible-lint:
|
||||
name: YAML Lint + Ansible Lint
|
||||
pre-commit-ci:
|
||||
name: Pre-Commit
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@ -34,8 +34,5 @@ jobs:
|
||||
ansible-galaxy install -r collections/requirements.yml
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Run yamllint
|
||||
run: yamllint .
|
||||
|
||||
- name: Run ansible-lint
|
||||
run: ansible-lint
|
||||
- name: Run pre-commit
|
||||
uses: pre-commit/action@v3.0.0
|
||||
|
||||
21
.pre-commit-config.yaml
Normal file
21
.pre-commit-config.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
hooks:
|
||||
- id: requirements-txt-fixer
|
||||
- id: sort-simple-yaml
|
||||
- id: detect-private-key
|
||||
- repo: https://github.com/adrienverge/yamllint.git
|
||||
rev: v1.28.0
|
||||
hooks:
|
||||
- id: yamllint
|
||||
args: [-c=.yamllint]
|
||||
- repo: https://github.com/ansible-community/ansible-lint.git
|
||||
rev: v6.8.2
|
||||
hooks:
|
||||
- id: ansible-lint
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.8.0.4
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
@ -41,6 +41,7 @@ pathspec==0.10.1
|
||||
pkgutil-resolve-name==1.3.10
|
||||
platformdirs==2.5.2
|
||||
pluggy==1.0.0
|
||||
pre-commit==2.20.0
|
||||
pyasn1==0.4.8
|
||||
pyasn1-modules==0.2.8
|
||||
pycparser==2.21
|
||||
|
||||
Loading…
Reference in New Issue
Block a user