M1-02: Woodpecker CI — lint, build and unit tests #2

Open
opened 2026-08-08 20:03:43 -04:00 by agent · 0 comments
Member

CI on every branch: ktlint, detekt, assemble, and the unit test suite.

This one is better than its iOS counterpart, and that matters

stash-ios has a lint job that runs and a build job that sits pending, because there is no macOS
agent
. Its tests run in a pre-push hook instead, as a local fast-fail, with a note that they
move to CI when an agent exists.

Android has no such problem. The whole toolchain runs in a Linux container, so this repo can do in
CI what the iOS repo cannot: build the APK and run the full unit test suite on every push, with no
Mac anywhere in the loop.

Take that. It is the one place where the Android port is straightforwardly stronger, and it
means the pre-push hook here is belt-and-braces rather than the only gate.

Scope

  • .woodpecker.yml: ktlint, detekt, assembleDebug, testDebugUnitTest.
  • Runs on all branches and on PRs into main.
  • Gradle cache between runs, or the job is slow enough that people stop watching it.
  • No deploy step. This repo never deploys anything.
  • No instrumented (connectedAndroidTest) runs in CI. That needs an emulator in the container and
    it is not worth the complexity for M1 — device behaviour is validated by Wes on the Pixel, the
    same as on iOS.

Done when

A pushed branch goes green, a deliberately-broken lint rule goes red, and a deliberately-failing
unit test goes red.


Milestone 1 of Stash for Android, mirroring stash-ios M1. M1 is a functioning app on the test
device with no sync at all — record voice memos reliably and get them off the device by hand.
Sync arrives in M3.

Test device is a Pixel 6 (Tensor G1) borrowed from a friend, until something better turns up.
Stock Android, so no OEM battery-killer behaviour to fight — worth remembering that a phone from
another manufacturer may not be as forgiving about background work.

Translation of Stash/stash-ios#2. Where the platform forces a different answer this issue says so; where it
does not, the iOS issue is the fuller statement of intent and should be read alongside this one.

Working agreement for every issue in this repo: feature branch, tested before the PR opens
(on-device where the label says so), then Wes reviews the PR and we walk the code together. Docs
update in the same commit. A PR that takes more than 20 minutes to review is too big — say so and
split it.

CI on every branch: ktlint, detekt, assemble, and the unit test suite. ## This one is better than its iOS counterpart, and that matters `stash-ios` has a lint job that runs and a build job that **sits pending, because there is no macOS agent**. Its tests run in a `pre-push` hook instead, as a local fast-fail, with a note that they move to CI when an agent exists. Android has no such problem. The whole toolchain runs in a Linux container, so this repo can do in CI what the iOS repo cannot: build the APK and run the full unit test suite on every push, with no Mac anywhere in the loop. **Take that.** It is the one place where the Android port is straightforwardly stronger, and it means the `pre-push` hook here is belt-and-braces rather than the only gate. ## Scope - `.woodpecker.yml`: ktlint, detekt, `assembleDebug`, `testDebugUnitTest`. - Runs on all branches and on PRs into `main`. - Gradle cache between runs, or the job is slow enough that people stop watching it. - **No deploy step.** This repo never deploys anything. - No instrumented (`connectedAndroidTest`) runs in CI. That needs an emulator in the container and it is not worth the complexity for M1 — device behaviour is validated by Wes on the Pixel, the same as on iOS. ## Done when A pushed branch goes green, a deliberately-broken lint rule goes red, and a deliberately-failing unit test goes red. --- *Milestone 1 of Stash for Android, mirroring `stash-ios` M1. M1 is a functioning app on the test device with **no sync at all** — record voice memos reliably and get them off the device by hand. Sync arrives in M3.* *Test device is a **Pixel 6** (Tensor G1) borrowed from a friend, until something better turns up. Stock Android, so no OEM battery-killer behaviour to fight — worth remembering that a phone from another manufacturer may not be as forgiving about background work.* *Translation of `Stash/stash-ios#2`. Where the platform forces a different answer this issue says so; where it does not, the iOS issue is the fuller statement of intent and should be read alongside this one.* *Working agreement for every issue in this repo: feature branch, tested before the PR opens (on-device where the label says so), then Wes reviews the PR and we walk the code together. Docs update in the same commit. A PR that takes more than 20 minutes to review is too big — say so and split it.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Stash/stash-android#2
No description provided.