Skip to content

Compile-test every published template in CI - #63

Merged
ptr727 merged 1 commit into
mainfrom
develop
Jul 24, 2026
Merged

ptr727 merged 1 commit into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Extends the change-gated compile test, which previously covered only the easystart component, to every published template. Anything published is now known to build against the current ESPHome release.

Changes

  • 17 example device configs under test/, one per device template. Subdirectories are invisible to the ESPHome Device Builder dashboard, whose scan is non-recursive, so these do not show up as phantom devices.
  • A fail-fast: false matrix job compiling each config on the ptr727/esphome-nonroot deployment image, so every template reports its own pass/fail.
  • The matrix is generated from test/ by the changes job, which also fails the run when a template outside the utility-include set has no example device. A newly published template therefore cannot go silently untested.
  • Change gate extended to templates/, test/, and easystart/components/; the aggregator fails only on failure, so a gated skip still passes.

Template fixes found by the first sweep

Three published templates did not build:

  • sonoff-s31: missing parity: EVEN, the CSE7766 transmits 8E1.
  • smarthome-ceilsense: upstream added check_firmware_update_when_online, which references entities this template strips.
  • esp32-s3-wroom-2-n32r8v: 32MB flash with OTA requires the experimental IDF opt-in.

norvi-enet-ae06-r gains a templates_dir substitution so its Utils.h include follows the including config, since ESPHome resolves includes: against the device config directory rather than the template directory. efun-sh331 had a stale device_comment in its header.

Verification

  • All 17 test configs and all 12 root device configs validate.
  • The four changed templates compiled locally, plus garage-gate-fan-controller.yaml as a real-device regression, since includes: only resolves at build time.
  • actionlint, editorconfig-checker, markdownlint, and cspell clean.

🤖 Generated with Claude Code

Add an example device config per template under test/, and a fail-fast:false
matrix job that compiles each one on the deployment image. Subdirectories are
invisible to the Device Builder dashboard, whose scan is non-recursive, so the
example devices do not appear as phantom devices.

The matrix is generated from test/ by the changes job, which also fails the run
if a template outside the utility-include set has no example device, so a newly
published template cannot go silently untested.

Fix the three templates the first sweep found broken:

- sonoff-s31: declare parity: EVEN, the CSE7766 transmits 8E1.
- smarthome-ceilsense: remove check_firmware_update_when_online, added upstream
  and referencing entities this template strips.
- esp32-s3-wroom-2-n32r8v: opt into experimental IDF features, required for
  32MB flash with OTA.

Add a templates_dir substitution to norvi-enet-ae06-r so its Utils.h include
follows the including config, since ESPHome resolves includes: against the
device config directory rather than the template directory.

Correct the efun-sh331 header, which still documented device_comment.

Record the comment style rule in AGENTS.md.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI review requested due to automatic review settings July 23, 2026 23:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends CI to compile one example configuration per published ESPHome template, ensuring templates in templates/ are continuously build-verified against the current ESPHome release (in addition to the existing easystart component compile test).

Changes:

  • Add test/*.yaml example configs (one per device template) to act as CI compile targets and minimal usage samples.
  • Update .github/workflows/test-pull-request.yml to generate a matrix from test/, enforce 1 example per template, and compile each config with fail-fast: false.
  • Fix several published templates uncovered by the new compile sweep (UART parity, removed upstream script id, includes path resolution, IDF experimental opt-in, and header comment correction), plus document the new CI guarantee in README.md.

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/wemos-lolin32-lite.yaml Adds CI compile example for the Wemos Lolin32 Lite template.
test/sonoff-th10.yaml Adds CI compile example for the Sonoff TH10 template.
test/sonoff-s31.yaml Adds CI compile example for the Sonoff S31 template.
test/smarthome-ceilsense.yaml Adds CI compile example for the SmartHomeShop CeilSense template.
test/rocket-astra.yaml Adds CI compile example for the RocketController ASTRA template.
test/norvi-enet-ae06-r.yaml Adds CI compile example for the Norvi ENET-AE06-R template (with templates_dir override for includes: resolution).
test/konnected-blaq.yaml Adds CI compile example for the Konnected blaQ template.
test/kincony-kc868-asr.yaml Adds CI compile example for the Kincony KC868-ASR template.
test/gls10-bluetooth-proxy.yaml Adds CI compile example for the GL-S10 Bluetooth proxy template.
test/esp32-s3-wroom-2-n32r8v.yaml Adds CI compile example for the ESP32-S3-WROOM-2-N32R8V board overlay composed with the devkit template.
test/esp32-s3-wroom-2-n16r8v.yaml Adds CI compile example for the ESP32-S3-WROOM-2-N16R8V board overlay composed with the devkit template.
test/esp32-s3-devkitc.yaml Adds CI compile example for the ESP32-S3-DevKitC template.
test/efun-sh331.yaml Adds CI compile example for the EFUN SH331 template.
test/easystart.yaml Adds CI compile example showing how to compose the easystart template and build against local external components.
test/apollo-plt-1b.yaml Adds CI compile example for the Apollo PLT-1B template.
test/aoycocr-x5p.yaml Adds CI compile example for the Aoycocr X5P template.
test/adafruit-esp32-s3-feather.yaml Adds CI compile example for the Adafruit ESP32-S3 Feather template.
templates/sonoff-s31.yaml Fixes CSE7766 UART settings by explicitly declaring parity as EVEN (8E1).
templates/smarthome-ceilsense.yaml Updates removals to match upstream additions by removing the new firmware-check glue script id.
templates/norvi-enet-ae06-r.yaml Makes includes: path resolvable from non-root configs via a templates_dir substitution.
templates/esp32-s3-wroom-2-n32r8v.yaml Opts into experimental IDF features required to build the 32MB+OTA configuration.
templates/efun-sh331.yaml Corrects the template header’s required-substitutions comment.
README.md Documents that every device template has a test/ example compiled in CI and usable as a minimal sample.
AGENTS.md Adds a repo convention section for keeping comments structured and scannable.
.gitignore Ignores ESPHome’s auto-written test/.gitignore generated by local compiles.
.github/workflows/test-pull-request.yml Adds change-gated template compile matrix, enforces 1 example per template, and updates the aggregator gate accordingly.

@ptr727
ptr727 merged commit 7e3bdf5 into main Jul 24, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants