6min

Setting up GitHub actions

This doc explains how to setup reference replays which get tested with GitHub actions to detect major regressions.

1. Setup a reference replay

Replay a reference session testing a critical flow of your app, e.g. signing in, and save a reference replay:

Shell
|

This should create a meticulous.json configuration file with the following content:

JSON
|

You can rename the test case for better readability:

JSON
|

You should save and commit the meticulous.json file to enable testing and diffing.

The meticulous.json file should be located at the root of the repository, alongside package.json.

2. Run tests for new pull requests with GitHub actions

With at least one reference replay saved in meticulous.json, we can use them to test their end state for visual regressions:

Shell
|

Now we can run this command inside a GitHub workflow.

Here is a template you can add to your repository, at .github/workflows/meticulous-replay.yaml.

YAML
|

Adapt this template to your project, e.g. using yarn instead of npm or change the script used to start the local frontend server.



Updated 10 May 2022
Did this page help?
Yes
No