ESPSomfy-RTS/AGENTS.md
cjkas 787cebdb18 ci: review fixes for the release job and set_version.sh
- set_version.sh: three of its four patterns only matched digits and
  dots, so FW_VERSION and index.js stayed at v4.0.0.beta and index.html
  at ?v=3.0.14d. They now match any version, and the script fails when a
  file doesn't end up with the new one. test/scripts/test_set_version.sh
  covers it and runs with the native tests.
- Release job: each build's files are collected from its own folder,
  with 4 files each and no name in two builds, before they're signed.
  The version bump is made on the release's branch as it is now, not the
  tag, so a merge during the builds doesn't reject the push.
- Scorecard reports to code scanning only: publishing from a fork isn't
  supported, so no badge.
- New workflows renamed to .yaml like build.yaml. SECURITY.md: the routes
  open in Secured mode, and which jobs can write what.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 19:34:14 +01:00

1.3 KiB

Testing instructions

  • Fix any test or type errors until the whole suite is green.
  • Add or update tests for the code you change, even if nobody asked.
  • to test run pio test -e native
  • the web UI's protocol 2 client (data-src/js/): node --test "test/js/*.test.js". The minify step joins those files into index.js, so each one ends with a module.exports footer for Node and adds nothing global but its classes.
  • the release scripts in .github/ (set_version.sh): bash test/scripts/test_set_version.sh, which CI runs with the native tests.
  • coverage of the native tests: pio test -e coverage, then gcovr (pip install gcovr), which reads gcovr.cfg and writes coverage/coverage_details.html. Files the native env doesn't build aren't in it. CI publishes the coverage of main to the repo's GitHub Pages.
  • coverage of the web UI tests: add --experimental-test-coverage --test-coverage-include="data-src/js/**" to the node --test command.

Building

  • Firmware builds need pioarduino's Core (pip install pioarduino, or the pioarduino IDE extension). Stock PlatformIO Core refuses the pinned platform, see ADR 0003.
  • The platform installs its Python packages into ~/.platformio/penv and fails on Windows while pio.exe from that env is running. Run builds as python -m platformio from that env's Python.