Question

App platform: Wait for tests to pass before deploying

Posted February 24, 2021 548 views
CI/CDDigitalOcean App Platform

I appreciate how fast app platform is at detecting a new push to my GitHub repo and deploying it, but how can I configure it to wait for the automated tests to pass first?

I happen to use a GitHub Action to run tests.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

At the moment i’m using the gitlab CI to run all the tests etc on each branch. Then when it merges to master it just deploys. Rather than having a staging branch, we just test every branch and MR. It depends on the git flow you’re using.

But it would be cool if Digital Ocean did something similar to vercel or buddy CI where it adds it’s self to the pipelines in gitlab.

Because we should test master before it’s released but for now the branch only test seem to work fine.

Maybe you want to avoid this path, but I see tests as part of the development process, so that the github action could be triggered by commits to some staging branch. When that’s ok, follow to deploy by merging to the DO main branch.