Piet uses 'snapshot testing' to verify that changes do not unexpectedly modify
behaviour. During CI, sample pictures are generated by the various picture_{}
files in piet
's samples
module, and the results are compared against
previously generated versions.
The previously generated versions are stored in a separate repository,
piet-snapshots
; these are saved per-platform, because platform behaviour may
differ (especially around fonts).
If your patch changes the behaviour of these snapshots, they will need to be regenerated. The easiest way to do this is to open a draft PR; this will trigger a 'snapshots' CI run. On failure, this will upload an artifact containing the generated snapshots (see persisting workflow data using artifacts for information on artifacts).
In order to update the snapshots, you will need to open a companion PR in
the piet-snapshots
repo. This PR should include all of the new or changed
images expected by your main PR.
note: your PR in piet-snapshots
should be opened from a branch in that
repo, not in a fork; if you do not have write access to that repo ask @cmyr
or @raphlinus (or another administrator) to set it up for you.
note: When your PR is merged, you should merge (not rebase) your PR in
piet-snapshots
. Rebasing would cause the revision to be rewritten, which would
mean that the commit referenced by the submodule would no longer exist.