mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-31 14:36:20 -02:30
pre-commit: run slow hooks only in CI (#13494)
collection-build-install and check-checksums-sorted have low value for local development, as what they check isn't likely to be touched by most contributors It's also enough to run once pre-commit with --hook-stage manual in CI to run all hooks (since hooks without a 'stages' applies to all stages)
This commit is contained in:
+1
-2
@@ -8,8 +8,7 @@ pre-commit:
|
|||||||
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
|
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
|
||||||
ANSIBLE_STDOUT_CALLBACK: default
|
ANSIBLE_STDOUT_CALLBACK: default
|
||||||
script:
|
script:
|
||||||
- pre-commit run --all-files --show-diff-on-failure
|
- pre-commit run --hook-stage manual --all-files --show-diff-on-failure
|
||||||
- pre-commit run ansible-lint --hook-stage manual --all-files --show-diff-on-failure
|
|
||||||
cache:
|
cache:
|
||||||
key: pre-commit-2
|
key: pre-commit-2
|
||||||
paths:
|
paths:
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ repos:
|
|||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: collection-build-install
|
- id: collection-build-install
|
||||||
|
stages: [manual]
|
||||||
name: Build and install kubernetes-sigs.kubespray Ansible collection
|
name: Build and install kubernetes-sigs.kubespray Ansible collection
|
||||||
language: python
|
language: python
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
@@ -103,6 +104,7 @@ repos:
|
|||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|
||||||
- id: check-checksums-sorted
|
- id: check-checksums-sorted
|
||||||
|
stages: [manual]
|
||||||
name: Check that our checksums are correctly sorted by version
|
name: Check that our checksums are correctly sorted by version
|
||||||
entry: scripts/assert-sorted-checksums.yml
|
entry: scripts/assert-sorted-checksums.yml
|
||||||
language: python
|
language: python
|
||||||
|
|||||||
Reference in New Issue
Block a user