Branching User Guide for GitHub Actions

A guide on using branching and GitHub Actions.

📘

This guide is a guest contribution from our friends at Dashcam.

Overview

If your branch makes visual changes that cause RQA to fail, don't update the base tests. Instead, use branching.

Rainforest Test BranchCode Branch
Edit tests in a separate space (a ‘feature branch’), away from the rest of your test suiteEdit code in a separate space (a ‘feature branch’), away from the rest of your code
All tests in the Main branch will continue passing as beforeAll code in the Main branch will continue working as before
After the feature has been released, test edits can be merged from the ‘feature branch’ into the Main branchWhen the feature is ready to release, code changes can be merged from the ‘feature branch’ into the Main branch
Test merges must be triggered by a human (automatic deployment is planned)Code merges can be triggered either by a human, or automatically

Test a Pull on a new RQA Branch

Make a new RQA Branch

In RQA, make a new branch that is the exact same as the GitHub branch we're testing.

1368

Making a new branch

Add the label to the PR

The, add the label "rqa-branch" to the GitHub pull request. This tells our github action to look for a RQA branch that matches this pull request branch name.

420

Adding a label to the PR

Edit the RQA branch so the tests pass

Now you'll want to edit the test in that RQA branch.

Populate the branch with a test

You'll probably want to populate the right test with the right starting url so you can edit the test using the branch build. Once you push the change to the CI, the test should run with the build on the new branch. Find it in RQA, and from there we can edit the test

1081

Populate the correct test

Make your changes

648

Make desired changes

Rerun the tests

Now when you rerun the tests in the PR, they should pass!

Merge

Merge the RQA branch first

If you merge the pull first, the tests in main will fail. Instead, merge the RQA branch first.
First, review changes.

298

Review changes

You'll see an RQA diff. If all looks good, click "merge" and "confirm".

2351

Compare test differences

Merge the pull

Merge the pull request.

Monitor Main

Main should now pass as it has both the updated code and RQA has been updated.


If you have any questions, reach out to us at [email protected].