ci(pre-commit): check if rules is updated and valid

This commit is contained in:
Fu Hanxi
2021-02-09 12:34:16 +08:00
parent 4d3c2e284e
commit 80e86e7939
2 changed files with 129 additions and 0 deletions

View File

@@ -75,3 +75,19 @@ repos:
language: python
files: '\.gitlab/CODEOWNERS'
pass_filenames: false
- id: check-rules-yml
name: Check rules.yml all rules have at lease one job applied, all rules needed exist
entry: tools/ci/check_rules_yml.py
language: python
files: '\.gitlab/ci/.+\.yml|\.gitlab-ci.yml'
pass_filenames: false
additional_dependencies:
- PyYAML == 5.3.1
- id: check-generated-rules
name: Check rules are generated (based on .gitlab/ci/dependencies/dependencies.yml)
entry: .gitlab/ci/dependencies/generate_rules.py
language: python
files: '\.gitlab/ci/dependencies/.+'
pass_filenames: false
additional_dependencies:
- PyYAML == 5.3.1