I have a few workflows that run when commits are pushed to particular branches, such as
tests when commits are pushed to feature-branches and then a
build/deploy when pushed to develop, etc.
What I’d really like is to mimic our previous Jenkins setup where jobs could be triggered when PRs were opened rather than just relying on commits being pushed.
So for example:
If I have a feature branch, I can commit to it and push it without worrying about triggering too many redundant builds, and then when I create a PR to merge my feature into develop, have a job trigger at that point to run the tests, and then if they succeed and I merge the PR, the build/deploy job runs when that PR is merged to develop.
Is this possible?
Right now on circle, I have a setup where my tests are run with every commit that’s pushed to a feature branch, which is a bit much. It means that we don’t push our commits to the remote as often as we used to because we don’t want to rack up too much of a bill running too many builds…
Also, after our development workflow is done, and we’re happy everything is good, we create a PR to merge develop into master. At the moment, this doesn’t trigger anything on Circle, because no new commits have been pushed anywhere yet, so there’s no way to trigger the test jobs for dev->master, so we’re uncertain whether the tests still pass before doing the merge.
Any help/advice will be appreciated.