Pre-commit hooks (#125)

* feat: pre-commit

* empty

* fix: requirements.txt
This commit is contained in:
samerbahri98
2022-10-27 02:15:24 +02:00
committed by GitHub
parent 45ddd65e74
commit 4f3b8ec9e0
4 changed files with 27 additions and 7 deletions
+1
View File
@@ -12,3 +12,4 @@
- [ ] Ran `reset.yml` playbook
- [ ] Did not add any unnecessary changes
- [ ] 🚀
- [ ] Ran pre-commit install at least once before committing
+4 -7
View File
@@ -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
View 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
+1
View File
@@ -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