mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 12:35:25 +00:00
[ci] Add validate.*.yaml for config-only component tests (#16384)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user