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>
* 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>
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.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
* Use ComposablePreviewScanner to rework how screenshot testing works
* Add test sharding
* Update screenshots
* Fixes for Element Gallery
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
* Try to workaround OOM errors and the runner dying
* Some more tweaks:
- Add `-XX:MaxMetaspaceSize` (https://github.com/gradle/gradle/issues/19750)
- Remove `-PpreDexEnable` as it's deprecated and no longer used.
- Remove `--max-workers` as gradle will automatically use the optimal amount.
* Remove `--max-workers` in recording screenshots too
If the gradle build fails for some reason, the script should
bail out instead of carrying on and pushing a commit that
deletes all the screenshots[1]!
`set -e` simply makes the script return the appropriate
exit code immediately if any of the subcommands fails.
[1] e.g.
a58834240e