Closed vfonic closed 3 years ago
Good idea 👍 Let's investigate what is possible and how much will it cost.
Until then, with hub brew install hub
you can easily checkout the PR locally with hub pr checkout 84
(where 84 is PR id).
Yeah, that accounts that you: 1) Don't have any other changes working on 2) Have the DB prepared for testing those changes (maybe you need to run migrations?) 2a) Have some specific data in the DB that should be tested? 3) Have all the new gems and npm packages installed
I think we agree. :) Let me know if I can help somehow (I'd need some permissions for that though.)
Yeah, that accounts that you:
- Don't have any other changes working on
- Have the DB prepared for testing those changes (maybe you need to run migrations?) 2a) Have some specific data in the DB that should be tested?
- Have all the new gems and npm packages installed
I think we agree. :) Let me know if I can help somehow (I'd need some permissions for that though.)
Yes, it is not optimal but it works. Database is always problematic in this situations. There are 2 approaches that I used.
hub pr checkout 84
bin/rails db:drop db:create db:schema:load db:seed
tmp/some_state.dump
hub pr checkout 84
bin/rails db:drop db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d potres_development tmp/some_state.dump
bin/rails db:migrate
We have Heroku pipelines now so closing this.
https://devcenter.heroku.com/articles/github-integration-review-apps#review-apps-management-and-costs
TBH I never set this up, but it looks like it's possible to have review apps run on free dyno hours on Heroku. Might be worth to look into for easier testing of PRs, especially smaller PRs such as this one (where you can skip git-pulling the code changes locally, running the server, etc.): https://github.com/vlado/earthquake-croatia/pull/84