We host our web app source code on GitHub, and whenever something's pushed to the master branch, it's deployed to Heroku via CodeShip.
Currently, we have two environments on Heroku: staging and production (we develop locally).
I've created a test suite for the website in PHPUnit (while using BrowserStack SaaS as a frontend for Selenium), and would now like to integrate that into our deployment pipeline.
How would I do that? Heroku's new Review Apps seem like a good choice, but have in mind that I need to actually deploy the website app first and copy over the environmental variables.
This is how I imagine it should work:
- Push to
master
on GitHub - CodeShip is triggered
- PHPUnit tests are executed
- A new version of web app is deployed to Heroku if tests pass
TLDR; I'm trying to integrate my PHPUnit tests into our Github -> Heroku pipeline, and only deploy if the tests succeed. How do I integrate the PHPUnit tests ?