Goal
In addition to our current branch policy pipeline which performs a build of the proposed branch to be merged + runs unit tests within build. I would like to add an extra step which then simulates the resultant merge before integration with main code. If the 2nd-level build+test also passes, then the PR should be able to be completed (post normal Peer/code review). As we currently have several occasions where bugs/test failures are only being picked up AFTER merge.
Existing Pipeline/Process
Currently, the existing branch policy (YAML) pipelines generally consist of the following tasks:
VSBuild
/dotnetcore build
of the proposed branchVSTest
/dotnetcore test
of proposed branch
Proposed Pipeline/Process
I believe the extra steps I’m looking for in the pipeline (after it’s successfully performed the above tasks) is:
- Create temporary branch (e.g.
sim-merge
) from the proposed branch to be merged - Merge with
main
(simulating the post PR merge state) - Perform a build on newly-merged
sim-merge
branch - Perform/Run unit tests on simulated merge build (if successfully built)
In future, we may want to add an additional step that takes the new “simulated” merge build and deploys it to a temp environment to run some additional (quick) automated integration/API tests. Again, all to add confidence to quality to (and reduce risk of breaking) the main branch.
Question
Does anyone have any examples they can point to of a tried+tested YAML pipeline config that could achieve something like this?
I tried searching online (+on this site) for existing pipelines, but all results that come back are for doing standard build validation. So I suspect I’m not using the correct term for this type of “simulated” merge (before doing final merge)
Thanks in advance for any guidance.