From 0f8bf3891319c4e49f5312518a6db494acef08d1 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Fri, 21 Apr 2023 11:37:14 +0800 Subject: [PATCH] ci: run readme check when constants.py or check script updated --- .pre-commit-config.yaml | 3 ++- tools/ci/check_build_test_rules.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3cba95905b..412b2562be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -139,7 +139,8 @@ repos: name: Check if all apps readme files match given .build-test-rules.yml files. Modify the supported target tables entry: tools/ci/check_build_test_rules.py check-readmes language: python - files: 'tools/test_apps/.+|examples/.+|components/.+' + files: 'tools/test_apps/.+|examples/.+|components/.+|tools/idf_py_actions/constants.py|tools/ci/check_build_test_rules.py' + require_serial: true additional_dependencies: - PyYAML == 5.3.1 - idf_build_apps diff --git a/tools/ci/check_build_test_rules.py b/tools/ci/check_build_test_rules.py index 940c7f31a5..9b66c74d86 100755 --- a/tools/ci/check_build_test_rules.py +++ b/tools/ci/check_build_test_rules.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import argparse @@ -468,6 +468,9 @@ if __name__ == '__main__': else: check_dirs.add(p) + if 'tools/idf_py_actions/constants.py' in arg.paths or 'tools/ci/check_build_test_rules.py' in arg.paths: + check_all = True + if check_all: check_dirs = {IDF_PATH} _exclude_dirs = [os.path.join(IDF_PATH, 'tools', 'unit-test-app'),