Build on specific branched and PR-ed branches

circle.yml

#1

I am wondering if CircleCI supported running test based on specified branches (e.g. production, staging) and the branches linked to PR?

Thanks!

P.S. which means others feature branches won’t test until PR is created


#2

In the circle.yml file, which is how you control your builds, you can choose to run (or not run) tests based on a branch It’s all done via Bash commands really.


#3

Hey do you have a link to docs for this for CircleCI v2.0? I can find how to do it for v1.0 and via checking the CIRCLE_BRANCH var inside a bash script only though :confused:


#4

You’d still need to use an if block (or similar) in Bash to do this with 2.0 using that same variable.


#5