Commit Graph

499 Commits

Author SHA1 Message Date
Sedat Qaja 2a79103060 ci(release): pin the actions and keep inputs out of the shell
zizmor flags the HealthChat release workflow now that the rebase PR shows
the whole file as new: five actions referenced by floating major tags, the
workflow_dispatch version input expanded straight into a shell script, and
a Gradle cache on a release build.

- Pin checkout, setup-java, setup-gradle, upload-artifact and
  upload-google-play to commit SHAs with their version in a comment, the
  way every upstream workflow does.
- Pass the version input through the environment instead of expanding it
  into the run script.
- Disable the Gradle cache for the release build so a poisoned cache from
  another workflow cannot reach the signed bundle.
2026-10-19 16:42:35 +02:00
Sedat Qaja b0a577d2b2 ci: let the screenshot recorder pull LFS on the private fork
The cached LFS checkout action checks out with persist-credentials: false
and then runs `git lfs pull` on a cache miss. Upstream is public, so that
pull works anonymously; on this private fork it fails with
`could not read Username for 'https://github.com'`, which is why the
Record-Screenshots label never produced a recording here (the only
successful runs were manual dispatches with a warm LFS cache).

Keep the job token configured for both LFS checkout steps. The push of
the recorded goldens already authenticates with the same token.
2026-10-19 16:34:45 +02:00
Sedat Qaja db839dc5c3 Adapt HealthChat to upstream v26.10.0
Follow-ups needed after rebasing the HealthChat series from v26.07.0 onto
v26.10.0 that span several of the replayed commits:

- Rename the five PreviewParameterProvider subclasses in features/healthchat
  to the *PreviewParam suffix now enforced by Konsist.
- Rename MemberDirectoryEvents and HealthChatProfileSectionEvents to the
  *Event suffix used by every upstream sealed interface.
- Import FakeStartDMAction from features/startchat/test, where it lives now.
- ListItem lost its headlineContent parameter in favour of content.
- HomeView gained onAddAccountClick and onSwitchToAccount, and onRoomClick
  now carries an EventId; update HomeViewBackHandlingTest accordingly.
- Restore upstream's codecov-action pin (v7.1.1) that the CI squash carried
  back to v7.0.0.
- Gate the new pr-checks.yml on the upstream repository: this fork does not
  use the PR- label convention.
- Add the 26.10.0 section to HEALTHCHAT_CHANGES.md.
2026-10-19 09:05:35 +02:00
joel.poyet 1cf01cdc62 Add member directory tab to home navigation (#3)
* feat(healthchat): add member directory tab to home navigation

Third bottom-nav tab backed by the HealthChat API: searchable member
cards with native start-chat, approval-pending banner, retry on
failure and navigation into the native profile screens.

* fix(healthchat): stop tab back handler swallowing back presses

While a screen is pushed on top of Home, the still-composed tab
BackHandler intercepted back presses during the transition and
invisibly switched to the Chats tab. Gate it on the node's target
visibility in both the parent and Home's own backstack.

* fix(healthchat): satisfy detekt, ktlint and konsist rules

Import alias order, composable parameter order in HomeView, and konsist presenter helper shape.

* ci: pass the real repository name to the screenshot recorder

recordScreenshots.yml set GITHUB_REPOSITORY from `secrets.GITHUB_REPOSITORY`.
No such secret exists on this fork, so the expression expands to an empty
string and overrides the built-in environment variable of the same name.
recordScreenshots.sh checks it up front and exits 1 with "No repo specified",
so the workflow could never record anything here.

Use the `github.repository` context instead, which is always populated.

Claude-Session: https://claude.ai/code/session_01MQbp1EPM4TSXq8P8Pyq44F

* Update screenshots

* Revert "Update screenshots"

This reverts commit b99e0d643f.

* Reapply "Update screenshots"

This reverts commit 85bceb6d67.

* test(screenshots): stop a LayoutLib teardown crash failing the shard tests

Paparazzi 2.0.0-alpha05 / LayoutLib 16.2.1 races on HandlerThread startup:
HandlerThread_Delegate.run calls Process.setThreadPriority, which throws
NoSuchMethodError for Thread.setPosixNicenessInternal and kills the
"android.bg" thread. If the test thread reaches getLooper() after that, it
gets null, BackgroundThread.ensureThreadReady() NPEs, and the static
initialiser of LatencyTracker fails. The JVM then marks that class erroneous
for the lifetime of the fork, so every later preview showing the soft
keyboard dies with NoClassDefFoundError.

LayoutLibErrorFilterStatement already swallowed the bare NoSuchMethodError,
but PaparazziLogger re-throws collected background errors from teardown()
wrapped in a MultipleFailuresException when there is more than one, and that
wrapper slipped through. A recent run reported 17 failures with zero image
comparisons failing and zero delta images written.

Unwrap the wrapper by reflection and swallow it only when every collected
cause matches the known-bug list; anything unrecognised, and anything that
cannot be decomposed, is rethrown.

Also close a hole this filter had from the start. Paparazzi runs the test as
`try { body } finally { teardown() }`, so a teardown error discards whatever
the body threw — including a genuine snapshot mismatch. renderFailureCapture
is registered inside the Paparazzi rule to record the body's exception so it
wins over any teardown error, and the filter refuses to swallow anything if
that rule is not registered. Two HorizontalFloatingToolbar previews have been
mismatching silently behind this, and may now surface as real failures.

Claude-Session: https://claude.ai/code/session_01MQbp1EPM4TSXq8P8Pyq44F

---------

Co-authored-by: ElementBot <android@element.io>
2026-10-19 08:56:59 +02:00
Sedat Qaja 708535469e ci: run the fork's pipelines on the self-hosted runners
Squash of ten CI commits from 2026-08-04 (all part of HealthChat release 26.08.0):

- ci(release): move releases to the persistent self-hosted runners
- ci: grant contents:read so checkout works on this private fork
- ci: disable the Label Community PRs job on this fork
- ci: run the heavy Gradle jobs on the self-hosted runners
- ci: rely on the runner image for the Android SDK
- ci: size the Gradle heap for the self-hosted containers
- ci: report runner capacity on the self-hosted jobs
- ci: record why the Gradle heap is reduced
- ci: cap Gradle workers so test JVMs fit the container
- ci: skip the codecov upload when no token is configured

The danger.yml hunk from the contents:read commit is omitted: upstream
replaced Danger with a github-script workflow in v26.09.
2026-10-19 08:47:32 +02:00
joel.poyet 3db17825de fix(release): drop changesNotSentForReview from Play upload
Play now sends this app's changes for review automatically and the Edits
API rejects the parameter, so the AAB uploaded but the edit never committed.
2026-10-19 08:46:59 +02:00
joel.poyet 4778fe4a98 ci(release): add HealthChat Play Store release pipeline 2026-10-19 08:46:57 +02:00
Benoit Marty 2bec8e1487 Let Gradle continue after a task failure in CI checks
Add --continue to the unit tests, screenshot tests, detekt and ktlint
Gradle invocations, so that a failure in one module does not prevent
the other modules from being checked, and the CI reports all the
failures at once.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 14:46:05 +02:00
renovate[bot] 1c500374c1 Update actions/upload-artifact action to v7.0.2 (#7921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-14 12:25:19 +00:00
Benoit Marty dfccc42326 Do not list enterprise commit messages in the submodule update PR
The enterprise repository is private, so only mention the number of new
commits in the generated PR description.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 10:33:22 +02:00
Benoit Marty 76c1d9a4d2 Add workflow to keep the enterprise submodule on the latest main
When a PR is merged on develop with the enterprise submodule targeting a commit
which is not on the enterprise main branch, open a PR to update it to the latest
commit of main. The workflow also runs daily and manually to keep the submodule
up to date.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 09:54:54 +02:00
ElementBot 9805422a8a Update Matrix Rust SDK to 26.10.05-nightly (#7844)
* Update Matrix Rust SDK to 26.10.01-nightly

* Add ivy repository for nightly SDK binding versions

* Fix API breaks

* Make sure we can't release a version with a `-nightly` SDK version

* Fix typo

Co-authored-by: Benoit Marty <benoitm@element.io>

* Update Matrix Rust SDK to 26.10.05-nightly

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>
2026-10-07 11:13:36 +02:00
ganfra c7f5024729 Merge pull request #7868 from element-hq/renovate/gradle-actions-6.x
Update gradle/actions action to v6.4.0
2026-10-06 17:29:18 +02:00
renovate[bot] 7be369a5da Update gradle/actions action to v6.4.0 2026-10-06 06:37:04 +00:00
Benoit Marty 2864e867fa End all the remaining sessions of the Maestro account after the tests
Each Maestro run logs in to @maestroelement:matrix.org, and the sessions
pile up on the account. Run tools/mas/delete_all_sessions.py at the end
of the Maestro job, even if the tests failed, to end them all.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 15:00:37 +02:00
Benoit Marty 73b3282939 Stop rewriting screenshots that did not meaningfully change
Recording rewrote every screenshot unconditionally, so renderer noise far below
the verification tolerance produced large "Update screenshots" commits.

Use `app.cash.paparazzi.overwriteOnMaxPercentDifference` to keep screenshots that
are within tolerance. Existing screenshots are no longer deleted before recording;
obsolete ones are pruned afterwards, only when their preview produced no
screenshot at all.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 15:46:28 +02:00
Benoit Marty fc63d95b65 Merge pull request #7717 from element-hq/renovate/zizmorcore-zizmor-action-0.x
Update zizmorcore/zizmor-action action to v0.6.4
2026-09-29 17:42:12 +02:00
renovate[bot] 00b40815d6 Update codecov/codecov-action action to v7.1.1 2026-09-28 09:35:19 +00:00
renovate[bot] 80591449ab Update zizmorcore/zizmor-action action to v0.6.4 2026-09-28 07:30:15 +00:00
Jorge Martin Espinosa c4529b87b4 Remove Roborazzi, use Paparazzi for Compound (#7735)
* Remove Roborazzi, use Paparazzi for Compound

The new screenshots will be recorded with the rest of the Paparazzi ones. Note the names changed, since Paparazzi enforces a `$packagename.$testname.$name.$extension` format

* Set a max width value for color previews

* Merge the `verifyPaparazziDebug` CI steps

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-09-21 12:27:56 +02:00
renovate[bot] ca753ee600 Update actions/setup-java action to v6.0.1 2026-09-17 12:54:12 +00:00
Jorge Martin Espinosa 7aa43411e0 Reduce parallel JVMs spawned for tests (#7701)
* Set `maxParallelForks = 1` for most tests, except for screenshot ones

It turns out the Robolectric setup penalty compounds the more parallel JVMs you spawn. Using 1 JVM vs 8 was up to 2.5x faster in local tests.

* Split the roborazzi tests tasks config and CI step
2026-09-14 18:14:46 +02:00
Benoit Marty 8e1a34cff8 Merge pull request #7649 from element-hq/feature/bma/replaceDangerByGhAction
Replace Danger with actions/github-script
2026-09-09 11:30:13 +02:00
ganfra be666176a7 Merge pull request #7658 from element-hq/renovate/zizmorcore-zizmor-action-0.x
Update zizmorcore/zizmor-action action to v0.6.3
2026-09-07 19:03:36 +02:00
Benoit Marty 10eb7ceb60 Merge pull request #7655 from andreBurnt/fix/maestro-skip-fork-prs
Maestro (local): skip the lane on pull requests from forks
2026-09-07 14:26:52 +02:00
renovate[bot] 35e0f83722 Update zizmorcore/zizmor-action action to v0.6.3 2026-09-07 02:25:04 +00:00
andreBurnt 11016da8ae Maestro (local): skip the lane on pull requests from forks
Secrets are never exposed to pull_request runs from forks, so checkEnv.js
throws on MAESTRO_PASSWORD after a full APK build and emulator boot, and the
red check is indistinguishable from a real test failure. The existing guard
checked github.event.pull_request.fork, a field that does not exist on the
pull_request payload (it lives at head.repo.fork), so it was always true.

Gate both jobs at job level on head.repo.full_name == github.repository
(workflow_dispatch still runs), and drop the dead step-level condition.

Fixes #7653

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 07:28:33 -07:00
andreBurnt 443112706a Maestro (local): queue pending runs in the maestro-test concurrency group
With the default (queue: single), a run that finishes Build APK while
another run is already pending in the maestro-test group cancels that
pending run, which then never gets a Maestro verdict for its commit.
queue: max keeps the one-at-a-time constraint (no cancel-in-progress) and
lets up to 100 runs wait, at no runner cost.

Fixes #7654

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 07:28:33 -07:00
Benoit Marty d0d30dc6e2 Replace Danger with actions/github-script
The PR metadata checks move to a new PR Checks workflow, and the lint,
ktlint and detekt reports are now surfaced as inline annotations from the
quality workflow. This removes the danger-js dependency, its ad-hoc npm
installs and the need for the ElementBot token, so the checks also run on
pull requests from forks.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-04 15:54:02 +02:00
renovate[bot] da44cc4075 Update danger/danger-js action to v14 (#7602)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-03 09:27:54 +02:00
renovate[bot] dd8877e6cd Update actions/setup-java action to v6 (#7614)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-03 09:27:24 +02:00
Jorge Martín eb121289fe Add GRADLE_OPTS for sync-localazy.yml flow 2026-09-02 11:29:41 +02:00
Benoit Marty 3758aac6d3 Do not build the enterprise build, it's built elsewhere. 2026-08-27 08:52:44 +02:00
Benoit Marty 999ee9737e Merge pull request #7355 from hayaksi1/fix/822-record-screenshots-no-change
Do not fail the screenshot recording job when there is nothing to commit
2026-08-12 13:51:20 +02:00
renovate[bot] 9a5aab2d73 Merge pull request #7384 from element-hq/renovate/gradle-actions-6.x
Update gradle/actions action to v6.3.0
2026-08-11 11:52:02 +02:00
renovate[bot] 481407329f Update actions/setup-java action to v5.7.0 (#7339)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-10 16:03:45 +02:00
renovate[bot] 829dbb1563 Update zizmorcore/zizmor-action action to v0.6.2 (#7383)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-10 08:16:20 +00:00
hayaksi1 aa64f07ff0 Do not fail the screenshot recording job when there is nothing to commit
recordScreenshots.sh runs under `set -e`, and the `git commit -m "Update
screenshots"` at the end of it is unconditional. When a recording run
produces no diff — the common case once the snapshots are already up to
date — `git commit` exits 1 with "nothing to commit, working tree clean"
and takes the whole workflow down with it, reporting a red job for a
successful run.

Stage as before, then return early when the staged diff is empty. `set -e`
is left in place: it was added deliberately so that a failed Gradle run
cannot push a commit that deletes every snapshot. Using `git diff --cached
--quiet` as an `if` condition is `set -e`-safe, because its non-zero "there
are changes" status is consumed by the condition. The early return also
skips the push, which had nothing to send.
2026-08-09 13:11:16 +03:00
renovate[bot] b1b52da38e Update reactivecircus/android-emulator-runner action to v2.38.0 (#7189)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-06 18:32:08 +02:00
renovate[bot] cdc4ac73fc Update actions/stale action to v11 2026-08-04 20:49:57 +00:00
renovate[bot] 1a07fdfed0 Update zizmorcore/zizmor-action action to v0.6.1 (#7306)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-31 09:03:28 +02:00
Jorge Martin Espinosa 52d146a59d CI: split unit tests, screenshots and coverage in tests.yml (#7296)
* Check if splitting the steps for testing and generating the reports improves performance and keeps the coverage stats

* Exclude Konsist tests and include `:app` ones

* Remove the extra dependency of `koverVerifyAll` on `:app:koverVerify{variant}`
2026-07-30 11:51:18 +02:00
renovate[bot] 03639caa75 Update actions/checkout action to v7.0.1 2026-07-27 16:18:01 +00:00
renovate[bot] 4d9bbd67c3 Update actions/setup-python action to v7 (#7278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-27 10:56:07 +02:00
renovate[bot] bce559dc1b Update actions/setup-java action to v5.6.0 2026-07-23 16:52:37 +00:00
renovate[bot] 8d9bec57d7 Update zizmorcore/zizmor-action action to v0.6.0 (#7256)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-22 17:58:57 +02:00
renovate[bot] eddac3eaaa Update actions/setup-java action to v5.5.0 2026-07-21 08:21:05 +00:00
Jorge Martin Espinosa 4a9fd056eb CI: fix 'Update Gradle Wrapper' (#7238)
The action needs a JDK 21, but the step to install it wasn't running for us because an incorrect check was added.
2026-07-17 14:29:43 +00:00
Benoit Marty 2e161914a9 Update aaptDump.txt when syncing strings from Localazy
New locales added via Localazy would change the locales line in
aaptDump.txt and break the manifest CI check if the reference file
is not kept in sync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-08 14:42:13 +02:00
Benoit Marty ac822544f2 Split gradle invocation, else universal build is not generated. 2026-07-08 14:12:32 +02:00