1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-16 07:27:50 +02:00
This commit is contained in:
J. Nick Koston 2025-10-14 22:06:13 -10:00
parent 5cb0ed96e8
commit b1966d732b
No known key found for this signature in database

View File

@ -52,6 +52,7 @@ class TestResult:
success: bool
duration: float
command: str = ""
test_type: str = "compile" # "config" or "compile"
# Platform-specific maximum group sizes
@ -167,10 +168,13 @@ def format_github_summary(test_results: list[TestResult]) -> str:
# Summary statistics
total_time = sum(r.duration for r in test_results)
# Determine test type from results (all should be the same)
test_type = test_results[0].test_type if test_results else "unknown"
lines.append(
f"**Results:** {len(passed_results)} passed, {len(failed_results)} failed\n"
)
lines.append(f"**Total time:** {total_time:.1f}s\n")
lines.append(f"**Test type:** `{test_type}`\n")
# Show failed tests if any
if failed_results:
@ -364,6 +368,7 @@ def run_esphome_test(
success=success,
duration=duration,
command=cmd_str,
test_type=esphome_command,
)
except subprocess.CalledProcessError:
duration = time.time() - start_time
@ -377,6 +382,7 @@ def run_esphome_test(
success=False,
duration=duration,
command=cmd_str,
test_type=esphome_command,
)
@ -439,6 +445,7 @@ def run_grouped_test(
success=False,
duration=0.0,
command=f"# Failed during config merge: {e}",
test_type=esphome_command,
)
# Create test file that includes merged config
@ -505,6 +512,7 @@ def run_grouped_test(
success=success,
duration=duration,
command=cmd_str,
test_type=esphome_command,
)
except subprocess.CalledProcessError:
duration = time.time() - start_time
@ -518,6 +526,7 @@ def run_grouped_test(
success=False,
duration=duration,
command=cmd_str,
test_type=esphome_command,
)