1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Rework the Cypress & Percy CI (#8691)

* Split Cypress out into its own workflow

* Improve PR Details job to use github-script and output labels

* Fix wrongly using github.ref in workflow_run actions which always refer to develop

* Update pr-details to be far more generic

* Tweak how we fill command-prefix

* Tweak cypress job to pass more params & fix if condition

* Bring in external changes

* Add docs

* Use new composite action, and an action to update a status check based on this workflow run

* Iterate approach
This commit is contained in:
Michael Telatynski
2022-06-07 09:03:25 +01:00
committed by GitHub
parent bba9189820
commit fa8c346dfa
6 changed files with 169 additions and 129 deletions

View File

@ -171,9 +171,8 @@ should generally try to adhere to them.
## Percy Visual Testing
We also support visual testing via Percy, this extracts the DOM from Cypress and renders it using custom renderers
for Safari, Firefox, Chrome & Edge, allowing us to spot visual regressions before they become release regressions.
Right now we run it as part of the standard Pull Request CI automation but due to only having 25k screenshots/month,
and each `cy.percySnapshot()` call results in 8 screenshots (4 browsers, 2 sizes) this could quickly be exhausted and
at that point we would likely run it on a CRON interval or before releases.
Each `cy.percySnapshot()` call results in 8 screenshots (4 browsers, 2 sizes) this can quickly be exhausted and
so we only run Percy testing on `develop` and PRs which are labelled `X-Needs-Percy`.
To record a snapshot use `cy.percySnapshot()`, you may have to pass `percyCSS` into the 2nd argument to hide certain
elements which contain dynamic/generated data to avoid them cause false positives in the Percy screenshot diffs.