vlado / earthquake-croatia

Code for app hosted on https://www.potres-petrinja.hr/ used for helping people in need during the earthquake crisis in Croatia
15 stars 13 forks source link

Setup staging and possibly have PRs auto-deploy as Heroku Review Apps #97

Closed vfonic closed 3 years ago

vfonic commented 3 years ago

https://devcenter.heroku.com/articles/github-integration-review-apps#review-apps-management-and-costs

You can optionally specify free or low-cost add-on plans in your app.json if those plans are sufficient to run and test your app.

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

vlado commented 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).

vfonic commented 3 years ago

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.)

vlado commented 3 years ago

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.)

Yes, it is not optimal but it works. Database is always problematic in this situations. There are 2 approaches that I used.

Approach 1

Approach 2

vlado commented 3 years ago

We have Heroku pipelines now so closing this.