fix(release): Skip tests and lint CI already passed #28

Merged
namillis merged 1 commit from fix/release-skip-ci-checks into main 2026-11-09 03:31:16 +00:00
Owner

What's wrong

A release takes about 15 minutes from pushing the tag (v0.3.1 took 14.2, v0.3.2 took 15.3). About 6 of those minutes repeat work CI already did. scripts/release.py runs clean, unit tests, lint and the release build on the tag's commit, but CI has already run tests and lint on that same commit when it merged into main. The release can't reuse CI's cached results, because it passes -PversionName/-PversionCode and those change BuildConfig, so the whole debug build, the tests and lint rebuild from scratch.

What changed

scripts/release.py asks Forgejo for CI's status on the tag's commit before it builds:

CI on the commit The release
passed builds only the signed release APK
still running waits for it (up to 15 minutes), then as above
failed stops without publishing
never ran runs tests and lint itself, as before

The APK checks after the build (package name, version, release certificate) and the publish steps are unchanged.

Not a goal: caching the release build itself, or releasing automatically on merge.

Checks

  • python3 -m py_compile scripts/release.py: OK.
  • Against the live Forgejo API: ci_state reports success for 308b928 (v0.3.2's commit) and 4d7452f, and None for 17cd651, a commit CI never saw. ci_passed returns True and False for those.
  • Not run: a full release with this change. The next tag will be the first, and its log will say "running the release build (CI already passed tests and lint)".
## What's wrong A release takes about 15 minutes from pushing the tag (v0.3.1 took 14.2, v0.3.2 took 15.3). About 6 of those minutes repeat work CI already did. `scripts/release.py` runs `clean`, unit tests, lint and the release build on the tag's commit, but CI has already run tests and lint on that same commit when it merged into `main`. The release can't reuse CI's cached results, because it passes `-PversionName`/`-PversionCode` and those change `BuildConfig`, so the whole debug build, the tests and lint rebuild from scratch. ## What changed `scripts/release.py` asks Forgejo for CI's status on the tag's commit before it builds: | CI on the commit | The release | |---|---| | passed | builds only the signed release APK | | still running | waits for it (up to 15 minutes), then as above | | failed | stops without publishing | | never ran | runs tests and lint itself, as before | The APK checks after the build (package name, version, release certificate) and the publish steps are unchanged. Not a goal: caching the release build itself, or releasing automatically on merge. ## Checks - `python3 -m py_compile scripts/release.py`: OK. - Against the live Forgejo API: `ci_state` reports `success` for `308b928` (v0.3.2's commit) and `4d7452f`, and `None` for `17cd651`, a commit CI never saw. `ci_passed` returns True and False for those. - Not run: a full release with this change. The next tag will be the first, and its log will say "running the release build (CI already passed tests and lint)".
fix(release): Skip tests and lint CI already passed
All checks were successful
CI / test (pull_request) Successful in 29s
8438050814
A release took about 15 minutes. It ran clean, unit tests, lint and
the release build on the tag's commit, but CI had already passed tests
and lint on that same commit when it merged. The release could not
reuse CI's cached results either: the version properties change
BuildConfig, so the debug build, tests and lint all rebuilt from
scratch, about 6 of the 15 minutes.

The release now asks Forgejo for CI's status on the commit. When CI
passed, it builds only the signed release APK. While CI is still
running it waits for it (up to 15 minutes). When CI failed it stops.
When CI never ran on the commit it runs tests and lint itself, as
before.
namillis deleted branch fix/release-skip-ci-checks 2026-11-09 03:31:16 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
namillis/LiveWireTV!28
No description provided.