Members of the Content Team do not have permission to contribute directly to the canonical repository, so when they want to make a change, they create a pull request using a fork of the repository. Also since they don't usually have a Ruby environment setup on their local machine, they will not be able to update files relating to the regression tests e.g. file checksums, Govspeak artefacts, etc. See documentation about adding regression tests for more information.
- Check out the branch from the forked repo onto your local machine. Note that
<github-username>
refers to the owner
$ git remote add <owner-of-forked-repo> [email protected]:<owner-of-forked-repo>/smart-answers.git
$ git fetch <owner-of-forked-repo>
$ git co -b <branch-on-local-repo> <owner-of-forked-repo>/<branch-on-forked-repo>
- Review the changes in the commit(s)
- Remove any trailing whitespace
- Run the following command to regenerate the Govspeak artefacts (in
test/artefacts/<smart-answer-flow-name>
) for the regression tests:
$ RUN_REGRESSION_TESTS=<smart-answer-flow-name> ruby test/regression/smart_answers_regression_test.rb
- Review the changes to the Govspeak artefacts to check they are as expected
- Run the following command to update the checksums for the smart answer:
$ rake checksums:update[<smart-answer-flow-name>]
For more information, see the checksums documentation.
- Run the main test suite
$ rake
- Stage the changed files & add a new commit or amend the commit
$ git add .
$ git commit # ok to amend commit if only one commit in PR
- Run the regression test for the smart answer (now that Govspeak artefacts & file checksums have been updated)
$ RUN_REGRESSION_TESTS=<smart-answer-flow-name> ruby test/regression/smart_answers_regression_test.rb
- Push the branch to GitHub and submit a new pull request so that people have a chance to review the changes and a Continuous Integration build is triggered. Close the original pull request.
$ git push origin <branch-on-local-repo>
See documentation on regression tests for further details.