J. Nick Koston
99c80b7dfa
[ci] Address copilot review feedback on import-time check
...
- determine-jobs: trigger on changes to requirements_test.txt too; that
file is hashed into the venv cache key and installed during
restore-python, so a change there can alter the import environment.
- ci.yml: merge the --check and --har steps so we only run
importtime-waterfall once per job (was measuring twice: ~7-8s of
wasted CI time per run). Uses the new script/check_import_time.py
--check --har <path> combination; the HAR reflects the same
measurement that produced the pass/fail decision.
- script/check_import_time.py: refactor the CLI so --har is a standalone
option rather than a mutually-exclusive mode. --check and --update
each accept an optional --har PATH that writes the HAR from the same
subprocess invocation. Plain --har is still supported for local use.
- tests: add tests/script/test_check_import_time.py covering HAR parsing,
root lookup, offender ranking/dedup, budget round-trip, and the three
--check exit paths (pass, regression, missing budget) plus the new
--check --har combined write. Add requirements_test.txt case to the
should_run_import_time parametrized test.
2026-04-23 14:47:03 -05:00
J. Nick Koston
900232be21
[ci] Parse importtime-waterfall HAR JSON; raise budget for CI runner
...
The previous parser walked `-X importtime` stderr by hand (string-splitting
on `|`, indent-width math). Replace it with a load of the HAR JSON that
importtime-waterfall already produces: each entry carries the module name,
self-time, and cumulative — no tree reconstruction needed. Drops the
hand-rolled retry loop too, since importtime-waterfall does best-of-6
internally.
The committed budget (75.2ms) was seeded on a fast local machine; GHA
runners measured 122.8ms, so the first CI run tripped the check. Reset
the baseline to 123ms with a 25% margin (ceiling ~154ms) to absorb GHA
variance. Tighten later once we have several data points.
Adds unit tests for should_run_import_time across the trigger matrix and
wires the new mock into the existing test_main_* suite.
2026-04-23 14:20:31 -05:00
J. Nick Koston
b293be23b0
[ci] Honor CONFLICTS_WITH when grouping component tests ( #15834 )
...
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com >
2026-04-18 08:11:38 -05:00
Tomer27cz
f01762ea44
[ci] move import to function ( #15440 )
2026-04-05 19:17:52 -04:00
Javier Peletier
0c5f055d45
[core] cpp tests: Allow customizing code generation during tests ( #14681 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-03-18 00:16:01 +00:00
J. Nick Koston
1670f04a87
[core] Add CodSpeed C++ benchmarks for protobuf, main loop, and helpers ( #14878 )
2026-03-17 12:29:38 -10:00
J. Nick Koston
56f7b3e61b
[ci] Only run integration tests for changed components ( #14776 )
2026-03-13 13:20:35 -10:00
Javier Peletier
e82f0f4432
[cpptests] support testing platform components ( #13075 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-03-10 02:41:02 +00:00
J. Nick Koston
d6ce5dda81
[ci] Skip YAML anchor keys in integration fixture component extraction ( #14670 )
2026-03-09 22:54:56 +00:00
dependabot[bot]
4d05cd3059
Bump ruff from 0.14.14 to 0.15.0 ( #13752 )
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-02-04 09:24:05 +00:00
J. Nick Koston
42491569c8
[analyze_memory] Add nRF52/Zephyr platform support for memory analysis ( #13249 )
2026-01-15 17:53:53 -10:00
J. Nick Koston
00cc9e44b6
[analyze_memory] Fix ELF section mapping for RTL87xx and LN882X platforms ( #13213 )
2026-01-15 10:38:24 -10:00
J. Nick Koston
45c0796e40
[ci] Add RP2040 to memory impact analysis ( #13134 )
2026-01-11 17:19:00 -10:00
Jonathan Swoboda
08beaf8750
[esp32] Remove Arduino-specific code from core.cpp ( #12501 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-12-16 20:06:12 -05:00
J. Nick Koston
a5bf55b6ac
[ci] Fix component batching for beta/release branches (3-4 → 40 per batch) ( #11759 )
2025-11-07 20:19:45 +13:00
J. Nick Koston
85d2565f25
[tests] Fix determine_jobs tests failing when target branch is beta ( #11758 )
2025-11-07 20:18:43 +13:00
J. Nick Koston
bdfd88441a
[ci] Skip memory impact analysis when more than 40 components changed ( #11741 )
2025-11-05 19:31:23 -06:00
J. Nick Koston
ce5e608863
[ci] Skip memory impact analysis for release and beta branches ( #11740 )
2025-11-05 14:32:45 -06:00
J. Nick Koston
060bb4159f
[ci] Cache component dependency graph for up to 3.4x faster determine-jobs ( #11648 )
2025-11-04 17:38:57 +13:00
J. Nick Koston
980098ca77
[ci] Fix non-component files incorrectly detected as components ( #11701 )
2025-11-04 16:47:11 +13:00
J. Nick Koston
6220084fe6
[ci] Fix memory impact analysis to filter incompatible platform components ( #11706 )
2025-11-04 12:23:04 +11:00
J. Nick Koston
08aae39ea4
[ci] Consolidate component splitting into determine-jobs ( #11614 )
2025-10-30 14:27:28 +13:00
J. Nick Koston
f6e4c0cb52
[ci] Fix component tests not running when only test files change ( #11580 )
2025-10-29 16:22:28 +13:00
J. Nick Koston
0119e17f04
[ci] Remove base bus components exclusion from memory impact analysis ( #11572 )
2025-10-29 08:08:13 +13:00
J. Nick Koston
6edbb94529
[ci] Fix test detection for components with only variant tests ( #11474 )
2025-10-22 00:06:14 -10:00
J. Nick Koston
5b15827009
[CI] Fix component detection when core files change in determine-jobs ( #11461 )
2025-10-22 16:58:40 +13:00
Javier Peletier
ae50a09b4e
C++ components unit test framework ( #9284 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
Co-authored-by: J. Nick Koston <nick@koston.org >
2025-10-21 22:21:22 +00:00
J. Nick Koston
0ae9009e41
[ci] Fix clang-tidy split mode for core file changes ( #11434 )
2025-10-20 20:39:50 -10:00
J. Nick Koston
3b6ff615e8
[ci] Fix clang-tidy split decision to account for component dependencies ( #11430 )
2025-10-21 15:39:15 +13:00
J. Nick Koston
ffb0e854b6
[ci] Optimize clang-tidy for small PRs by avoiding unnecessary job spitting ( #11402 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-10-21 10:24:46 +13:00
J. Nick Koston
255b5a3abd
[ci] Skip memory analysis when only Python/config files change in core ( #11397 )
2025-10-20 16:13:08 +13:00
J. Nick Koston
a0922bc8b0
[ci] Add automated memory impact analysis for pull requests ( #11242 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-10-20 07:43:38 +13:00
J. Nick Koston
1b0ca3360e
[ci] Group all PR builds, isolate direct changes for full validation on dev ( #11193 )
2025-10-14 19:49:14 -10:00
J. Nick Koston
3afa73b449
[ci] Filter out components without tests from CI test jobs ( #11134 followup) ( #11178 )
2025-10-11 18:27:18 -05:00
J. Nick Koston
ac566b7fd6
[clang-tidy] Include sdkconfig.defaults in hash calculation ( #11091 )
2025-10-06 22:06:30 +00:00
J. Nick Koston
0dda3faed5
[CI] Fix CI job failures for PRs with >300 changed files ( #10215 )
2025-08-13 15:46:56 +12:00
J. Nick Koston
f13e742bd5
[ruff] Enable RET and fix all violations ( #9929 )
2025-08-01 02:10:56 +00:00
J. Nick Koston
ffebd30033
[ruff] Enable SIM rules and fix code simplification violations ( #9872 )
2025-07-25 18:26:08 +12:00
J. Nick Koston
89b9bddf1b
[CI] Fix clang-tidy not running when platformio.ini changes ( #9678 )
2025-07-19 20:55:21 +12:00
J. Nick Koston
9e621a1769
Update script/helpers.py to use ESPHome YAML parser for integration fixtures ( #9544 )
2025-07-16 22:19:27 +12:00
J. Nick Koston
63b8a219e6
Include entire platformio.ini in clang-tidy hash calculation ( #9509 )
2025-07-15 01:26:39 -05:00
J. Nick Koston
b2a8b0a22f
Add pre-commit hooks to fix common formatting issues causing CI failures ( #9494 )
2025-07-15 12:25:18 +12:00
J. Nick Koston
8953e53a04
CI: Centralize test determination logic to reduce unnecessary job runners ( #9432 )
2025-07-11 21:54:57 +12:00
J. Nick Koston
e9c7596e00
Fix clang-tidy triggering full scan on Python-only core file changes ( #9412 )
2025-07-10 12:41:59 +12:00
J. Nick Koston
6616567b05
Speed up clang-tidy CI by 80%+ with incremental checking ( #9396 )
2025-07-10 09:00:44 +12:00