diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e3c1aa2..3bdb0447 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,6 +82,20 @@ In your code directory run: And you're ready to code ! +## Test your pull requests with a copy of the live data + +This requires Heroku access, and is not easy to do if you use Docker compose, but if you can, please copy the live data to your local instance (important if you want to test your PRs!), run the following in your local phoenix repo: + +```sh +export DATE=`date "+%Y%m%d%H%M%S"` +heroku pg:backups:capture --app edit-tosdr-org +heroku pg:backups:download --app edit-tosdr-org +mv latest.dump $DATE.dump +pg_restore --verbose --clean --no-acl --no-owner -d phoenix_development $DATE.dump +rails db:migrate +rails s +``` + ## Automated environment setup If you have installed [Docker compose](https://docs.docker.com/compose/install/), getting the application running involves two one-time steps, after which it can be started with a single command in the future.