ci: coverage reports for the native and web UI tests

A coverage env (the native env with gcov counters) runs the native
tests in CI; gcovr writes the HTML report and a table on the run's
summary page. The web UI tests report coverage with Node's built-in
coverage, and genhtml turns its lcov into HTML. Both reports are run
artifacts, and pushes to main publish them to GitHub Pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-31 12:07:58 +01:00
parent db73190653
commit bd399db73d
5 changed files with 117 additions and 4 deletions

9
gcovr.cfg Normal file
View file

@ -0,0 +1,9 @@
# Coverage of the native tests: pio test -e coverage, then gcovr.
# Only the files the native env builds show up (build_src_filter);
# the rest of src/ needs the ESP32 and isn't measured.
filter = src/
object-directory = .pio/build/coverage
sort = uncovered-percent
print-summary = yes
html-title = ESPSomfy-RTS native tests
html-details = coverage/