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 Branch | Code Branch |
---|---|
Edit tests in a separate space (a ‘feature branch’), away from the rest of your test suite | Edit 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 before | All 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 branch | When 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.
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.
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
Make your 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.
You'll see an RQA diff. If all looks good, click "merge" and "confirm".
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].
Updated about 1 year ago