CI: JVM tests, host C tests and both watchapp builds on every push #67

Closed
opened 2026-09-01 17:35:45 +02:00 by robert · 2 comments
robert commented 2026-09-01 17:35:45 +02:00 (Migrated from git.butzei.de)

Goal

Run the tests on every push. NFR-C7 was filed as "Open - recommended"; it is the cheapest quality win in the plan and it protects the fixture suites that #38 and #39 build.

Acceptance criteria

  • CI runs on every push and every pull request
  • JVM unit tests for the companion (#22, #39, #65)
  • Host-compiled watchapp logic tests (#68)
  • pebble build for both emery and gabbro, failing on warnings that matter
  • Android assemble, so a broken Gradle setup is caught before a ride
  • Enrichment fixtures (#38) run without network and without BRouter installed
  • Build status visible on the repository
  • Runtime kept short enough that it is not routinely skipped - target under 10 minutes
  • No secrets required for any CI job; anything needing a key is skipped with a clear message, per NFR-S3

Files

  • .gitea/workflows/ci.yml

Notes

See D34. The watchapp build matters as much as the tests: three screen geometries and a lot of PBL_IF_ROUND_ELSE, and a build that only ever runs on one developer's machine will break on the other platform quietly.

Update — 2026-09-03: the lanes and the runner

This issue now owns more than "CI runs tests" — it owns the whole pipeline defined in
PROCESS.md and
TESTING.md:

  • Self-hosted runner: an act_runner in Docker on the development machine, registered
    against this Forgejo instance, with a label matching the workflows. Nobody else owns this;
    without it nothing in this issue is testable
  • Two lanes, decoupled: dev-artifact (debug .pbw + .apk, published on every push, waits
    for no test — the 5-minute path) runs in parallel with the fast lane (target 120 s, hard fail
    180 s). Release tags refuse artifacts not built by the tag pipeline
  • Pinned toolchain images: Pebble build image pins pebble-tool / SDK 4.33.1 with the
    Python 3.13 pin asserted (3.14 installs but breaks pebble build — D54); Android image
    pins JDK 21 and a Gradle cache warmed at image build time
  • Workflow files live in .forgejo/workflows/ (Forgejo, not .gitea/ — verify which this
    instance honours, and note it here)
  • Artifact delivery Robert can reach from his phone: a rolling pre-release with the .pbw
    and debug .apk attached, so the 5-minute promise ends at his phone's browser, not at an API
    token

The 10-minute target above is superseded by the lane budgets in PROCESS.md §1.

## Goal Run the tests on every push. NFR-C7 was filed as "Open - recommended"; it is the cheapest quality win in the plan and it protects the fixture suites that #38 and #39 build. ## Acceptance criteria - [ ] CI runs on every push and every pull request - [ ] JVM unit tests for the companion (#22, #39, #65) - [ ] Host-compiled watchapp logic tests (#68) - [ ] `pebble build` for **both** `emery` and `gabbro`, failing on warnings that matter - [ ] Android assemble, so a broken Gradle setup is caught before a ride - [ ] Enrichment fixtures (#38) run without network and without BRouter installed - [ ] Build status visible on the repository - [ ] Runtime kept short enough that it is not routinely skipped - target under 10 minutes - [ ] No secrets required for any CI job; anything needing a key is skipped with a clear message, per NFR-S3 ## Files - `.gitea/workflows/ci.yml` ## Notes See D34. The watchapp build matters as much as the tests: three screen geometries and a lot of `PBL_IF_ROUND_ELSE`, and a build that only ever runs on one developer's machine will break on the other platform quietly. ## Update — 2026-09-03: the lanes and the runner This issue now owns more than "CI runs tests" — it owns the whole pipeline defined in [PROCESS.md](https://git.butzei.de/robert/PedalPebble/src/branch/main/docs/PROCESS.md) and [TESTING.md](https://git.butzei.de/robert/PedalPebble/src/branch/main/docs/TESTING.md): - [ ] **Self-hosted runner**: an `act_runner` in Docker on the development machine, registered against this Forgejo instance, with a label matching the workflows. Nobody else owns this; without it nothing in this issue is testable - [ ] **Two lanes, decoupled**: `dev-artifact` (debug `.pbw` + `.apk`, published on every push, waits for no test — the 5-minute path) runs in parallel with the fast lane (target 120 s, hard fail 180 s). Release tags refuse artifacts not built by the tag pipeline - [ ] **Pinned toolchain images**: Pebble build image pins `pebble-tool` / SDK 4.33.1 with the **Python 3.13 pin asserted** (3.14 installs but breaks `pebble build` — D54); Android image pins JDK 21 and a Gradle cache warmed at image build time - [ ] Workflow files live in `.forgejo/workflows/` (Forgejo, not `.gitea/` — verify which this instance honours, and note it here) - [ ] **Artifact delivery Robert can reach from his phone**: a rolling pre-release with the `.pbw` and debug `.apk` attached, so the 5-minute promise ends at his phone's browser, not at an API token The 10-minute target above is superseded by the lane budgets in PROCESS.md §1.
Owner

Workflow directory, verified: .forgejo/workflows/, not .gitea/workflows/.

Checked against https://forgejo.org/docs/latest/user/actions/overview/ on 2026-09-04: .forgejo/workflows/ is the primary location, and the only documented fallback (used when that directory is absent) is .github/workflows/. Forgejo's own docs never mention .gitea/workflows/ as a recognised path at all — it isn't a secondary option, it simply doesn't work on this instance (16.0.3+gitea-1.22.0). So the original issue text ("Files: .gitea/workflows/ci.yml") was wrong, most likely a holdover from before this Forgejo version was confirmed; the 2026-09-03 update's .forgejo/workflows/ is correct.

PR #80 implements the four lanes (dev-artifact/fast/slow/tag) from PROCESS.md/TESTING.md under .forgejo/workflows/, plus the three pinned toolchain images and docs/CI.md. Runner registration is deliberately excluded from that PR — it needs a token from the web UI and is Robert's manual step, not something this session attempted or should attempt. Everything else is workflow-definition work, verified by reading current Forgejo docs rather than by execution (no runner exists yet to run it against), and the PR says so plainly. See PR #80 for the full breakdown of what's real vs. what's flagged as unverified.

**Workflow directory, verified:** `.forgejo/workflows/`, not `.gitea/workflows/`. Checked against <https://forgejo.org/docs/latest/user/actions/overview/> on 2026-09-04: `.forgejo/workflows/` is the primary location, and the *only* documented fallback (used when that directory is absent) is `.github/workflows/`. Forgejo's own docs never mention `.gitea/workflows/` as a recognised path at all — it isn't a secondary option, it simply doesn't work on this instance (16.0.3+gitea-1.22.0). So the original issue text ("Files: `.gitea/workflows/ci.yml`") was wrong, most likely a holdover from before this Forgejo version was confirmed; the 2026-09-03 update's `.forgejo/workflows/` is correct. PR #80 implements the four lanes (dev-artifact/fast/slow/tag) from PROCESS.md/TESTING.md under `.forgejo/workflows/`, plus the three pinned toolchain images and `docs/CI.md`. **Runner registration is deliberately excluded from that PR** — it needs a token from the web UI and is Robert's manual step, not something this session attempted or should attempt. Everything else is workflow-definition work, verified by reading current Forgejo docs rather than by execution (no runner exists yet to run it against), and the PR says so plainly. See PR #80 for the full breakdown of what's real vs. what's flagged as unverified.
Owner

Closed by PR #80 (merged): all four workflow files in .forgejo/workflows/ (verified against Forgejo docs — .gitea/workflows/ was never a real fallback, only .github/workflows/ is), pinned+self-verifying toolchain Dockerfiles under tooling/docker/, and docs/CI.md mapping PROCESS.md/TESTING.md onto the actual files. Untested by execution — no runner is registered on this instance yet, so nothing here has actually run. Explicitly out of scope by design: building/pushing the toolchain images and registering the act_runner, both left as Robert's manual steps. Give the workflow files an extra-careful read once a runner exists and the first real run happens.

Closed by PR #80 (merged): all four workflow files in `.forgejo/workflows/` (verified against Forgejo docs — `.gitea/workflows/` was never a real fallback, only `.github/workflows/` is), pinned+self-verifying toolchain Dockerfiles under `tooling/docker/`, and docs/CI.md mapping PROCESS.md/TESTING.md onto the actual files. **Untested by execution** — no runner is registered on this instance yet, so nothing here has actually run. Explicitly out of scope by design: building/pushing the toolchain images and registering the act_runner, both left as Robert's manual steps. Give the workflow files an extra-careful read once a runner exists and the first real run happens.
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
robert/PedalPebble#67
No description provided.