CI: coverage and badges; tests on a push, builds on a pull request #51

Merged
twisla merged 4 commits from coverage into main 2026-10-06 12:39:26 +00:00
Owner

What

  • Coverage of lib/ by the host tests, measured with gcovr (scripts/coverage.sh): 94.6% of 3,193 lines today, 64.1% of branches. lib/SD and src/ have no host tests and aren't in that figure; the README says so.
  • Three badges in the README: the workflow's status on main (Gitea's own), coverage, and the latest release. CI publishes the last two as SVG files on the branch badges at each push to main.
  • CI does less on a push and more on a pull request. A push runs the host tests with coverage. A pull request also builds the release firmware and the Debug Build. A tag still does everything, then releases. Pull requests from forks don't run.
  • scripts/ci.sh takes tests or builds for one half. scripts/coverage.sh fails when a test fails.

Checked

  • On this branch, a push ran the tests and coverage and passed (run 36), and published both badge files with the job's own token; they are served from raw/branch/badges/.
  • This pull request is the first to run the pull-request path (tests, coverage, both builds).

🤖 Generated with Claude Code

https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT

## What - **Coverage of `lib/` by the host tests**, measured with gcovr (`scripts/coverage.sh`): 94.6% of 3,193 lines today, 64.1% of branches. `lib/SD` and `src/` have no host tests and aren't in that figure; the README says so. - **Three badges in the README:** the workflow's status on main (Gitea's own), coverage, and the latest release. CI publishes the last two as SVG files on the branch `badges` at each push to main. - **CI does less on a push and more on a pull request.** A push runs the host tests with coverage. A pull request also builds the release firmware and the Debug Build. A tag still does everything, then releases. Pull requests from forks don't run. - `scripts/ci.sh` takes `tests` or `builds` for one half. `scripts/coverage.sh` fails when a test fails. ## Checked - On this branch, a push ran the tests and coverage and passed (run 36), and published both badge files with the job's own token; they are served from `raw/branch/badges/`. - This pull request is the first to run the pull-request path (tests, coverage, both builds). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 3 commits 2026-10-06 12:23:10 +00:00
scripts/coverage.sh builds the host tests with coverage counters and
reports with gcovr: 94.6% of the 3,193 lines of lib/ today (lib/SD and
src/ have no host tests and aren't counted). CI runs it on every push,
puts the figure in the job's summary, and on main publishes a coverage
badge and a latest-release badge to the branch 'badges'. The README shows
them next to Gitea's own badge for the workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
Rebuilding both firmwares on every push was more than anyone looked at.
A push now runs the host tests with their coverage (under two minutes);
a pull request adds the release firmware and the Debug Build, and is how
changes reach main; a tag still does everything before it releases.
Pull requests from forks don't run. scripts/ci.sh takes 'tests' or
'builds' for one half; coverage.sh now fails when a test fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
CI: the badges are published from main only
CI / build (push) Successful in 1m5s
CI / build (pull_request) Successful in 8m19s
16345ed6b3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 1 commit 2026-10-06 12:23:11 +00:00
CI: the badges are published from main only
CI / build (pull_request) Successful in 8m19s
CI / build (push) Successful in 1m5s
16345ed6b3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla added 1 commit 2026-10-06 12:37:48 +00:00
R1 plan: pull requests, merged by rebase then a merge commit (Q161)
CI / build (pull_request) Successful in 8m17s
CI / build (push) Successful in 1m6s
873af31e21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
twisla merged commit 3120c63b4b into main 2026-10-06 12:39:26 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: twisla/roro9stack#51