ci: enable check typos for commit

This commit is contained in:
liuqiang
2025-07-17 10:06:30 +08:00
parent 882edef5a0
commit df4e838ae2
4 changed files with 132 additions and 25 deletions
+24 -24
View File
@@ -1,4 +1,5 @@
stages:
- check_typos
- cleanup
- docker_build
- build
@@ -236,6 +237,10 @@ build_image:
image: ${DOCKER_IMAGE_NAME}:chip_${CHIP_SHORT_HASH}_idf_${IDF_CHECKOUT_REF}
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push" || $CI_COMMIT_BRANCH == "main"
needs:
- job: build_image
optional: true
- job: check_typos
tags:
- build
# runner: `sudo mkdir -p /cache/matter_build/`
@@ -278,9 +283,6 @@ build_image:
build_esp_matter_examples_pytest_C6_idf_v5_1:
extends:
- .build_examples_template
needs:
- job: build_image
optional: true
artifacts:
paths:
- "examples/**/build*/size.json"
@@ -301,9 +303,6 @@ build_esp_matter_examples_pytest_C6_idf_v5_1:
build_esp_matter_examples_pytest_H2_idf_v5_1:
extends:
- .build_examples_template
needs:
- job: build_image
optional: true
artifacts:
paths:
- "examples/**/build*/size.json"
@@ -341,9 +340,6 @@ build_esp_matter_examples_pytest_H2_idf_v5_1:
build_esp_matter_examples_pytest_C2_idf_v5_1:
extends:
- .build_examples_template
needs:
- job: build_image
optional: true
artifacts:
paths:
- "examples/**/build*/size.json"
@@ -372,9 +368,6 @@ build_esp_matter_examples_pytest_C2_idf_v5_1:
build_ext_plat_c6_thread_controller_examples:
extends:
- .build_examples_template
needs:
- job: build_image
optional: true
script:
- *build_external_platform_example
- *build_esp32c6_thread_example
@@ -384,9 +377,6 @@ build_ext_plat_c6_thread_controller_examples:
build_zap_light_example:
extends:
- .build_examples_template
needs:
- job: build_image
optional: true
script:
- cd ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip
- source ./scripts/activate.sh
@@ -398,9 +388,6 @@ build_zap_light_example:
build_esp_matter_examples:
extends:
- .build_examples_template
needs:
- job: build_image
optional: true
artifacts:
paths:
- "examples/**/build*/size.json"
@@ -446,9 +433,6 @@ build_nopytest_remaining_examples_manual:
- if: $CI_COMMIT_BRANCH != "main"
when: manual
allow_failure: true
needs:
- job: build_image
optional: true
artifacts:
paths:
- "examples/**/build*/size.json"
@@ -473,9 +457,6 @@ build_esp_matter_examples_pytest_C3_idf_v4_4:
extends:
- .build_examples_template
image: ${DOCKER_IMAGE_NAME}:chip_${CHIP_SHORT_HASH}_idf_${IDF_CHECKOUT_REF}
needs:
- job: build_image
optional: true
artifacts:
paths:
- "examples/**/build*/size.json"
@@ -590,6 +571,7 @@ build_managed_component_light:
needs:
- job: build_image
optional: true
- job: check_typos
script:
- cd ${ESP_MATTER_PATH}/examples/managed_component_light
- idf.py set-target esp32c3
@@ -608,6 +590,7 @@ build_esp_rainmaker_apps:
needs:
- job: build_image
optional: true
- job: check_typos
artifacts:
paths:
@@ -647,6 +630,8 @@ build_docs:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "push"
tags:
- build
needs:
- job: check_typos
variables:
ESP_DOCS_LATEST_BRANCH_NAME: "main"
artifacts:
@@ -708,3 +693,18 @@ deploy_docs_production:
DOCS_DEPLOY_SERVER_USER: "$DOCS_PROD_SERVER_USER"
DOCS_DEPLOY_PATH: "$DOCS_PROD_PATH"
DOCS_DEPLOY_URL_BASE: "https://$DOCS_PROD_SERVER/$DOCS_PROD_PATH"
check_typos:
image: $CI_DOCKER_REGISTRY/esp-env-v6.0:1
stage: check_typos
script:
- pip install codespell
- git fetch origin main
- |
FILES=$(git diff --name-only origin/main...HEAD)
echo "change files: $FILES"
if [ -n "$FILES" ]; then
./tools/check_typos.sh $FILES
fi
tags:
- build