[ci] Add validate.*.yaml for config-only component tests (#16384)

This commit is contained in:
Jesse Hills
2026-05-13 11:37:33 +12:00
committed by GitHub
parent 45a8bd49c3
commit cb2dbcd70d
10 changed files with 589 additions and 22 deletions

View File

@@ -34,7 +34,7 @@ from typing import Any
# Add esphome to path
sys.path.insert(0, str(Path(__file__).parent.parent))
from helpers import BASE_BUS_COMPONENTS
from helpers import BASE_BUS_COMPONENTS, is_validate_only_file
from esphome import yaml_util
from esphome.config_helpers import Extend, Remove
@@ -283,6 +283,13 @@ def analyze_component(component_dir: Path) -> tuple[dict[str, list[str]], bool,
# Analyze all YAML files in the component directory
for yaml_file in component_dir.glob("*.yaml"):
# validate.*.yaml files are config-only -- they don't compile, so
# their contents must not influence compile-time grouping decisions
# (e.g. a !extend used only to exercise schema validation must not
# disqualify the whole component from being grouped).
if is_validate_only_file(yaml_file):
continue
analysis = analyze_yaml_file(yaml_file)
# Track if any file uses extend/remove