Best way to create a Ci/CD pipeline to reduce bugs and facilitate refactor
It might not be obvious now, but usually as projects advance full regression costs (resources/time) grow much faster than static analysis ones. 

You'll also find that static analysis alone isn't a sufficiently solid bug gate, it must be complemented with regression testing as well.

So I'd place the full regression after the static analysis in the CI/CD pipeline - I wouldn't want to waste full regression costs on code which doesn't even pass static analysis.

Down the road you'll probably find that running full regression and/or full static analysis in earlier pipeline stages can easily become bottlenecks:


if you block other commits while waiting for the run results you'd slow down the commit rate
if you allow other commits while a run is in progress they'll change the repository context potentially invalidating the earlier run results (for example you can't immediately fix a runtime bug uncovered by the run if the subsequent commit that happened in the meantime causes a build time breakage).


Addressing these bottlenecks usually means splitting such runs across 2 major  functional stages (each one can actually consist of multiple sub-stages and/or steps):


the (pre-)integration stage(s), which execute subsets of these runs in the earlier pipeline stages:


shorter - to maintaining a sufficiently high commit rate and avoiding bottlenecks
the target quality level is below deployment, but high enough to keep development flowing
fixing regressions detected in these stages has a high priority. 
it's possible to use such runs to gate commits/merges in order to prevent rather than detect and fix regressions, in which case these would actually be pre-integration stages

the post-integration stages, executing the longer/full regression and/or static analysis runs: 


the goal here would simply be increasing the quality to deployment levels (i.e. blocking the actual deployment if not met)
regressions detected at this stage aren't blocking for development, fixing them is a lower priority