Tests pass and then I want to push to the production

If all the tests passes with green then I would like to be pushed from development to production.
Of course I know how could I reset the changes from the current commit to previous.
git reset --hard HEAD
But what I don’t know is how to distinct between the success and failed tests (red and green)

1 Like

Would you be able to explain your desired process in more detail?

From what I’m understanding, all you need to do is have your deploy commands for production in the deployment section of circle.yml. That section will only run if 1) the branch matches and 2) if all of your test pass.

Please, forget about the development branch and just think master branch.

OK, workflow should be like this:
When the developer pushes commits to master.
I case. If all the tests passes and just then the code should be push to the master.
II case. If one test fail I don’t want the code to be pushed to master.

And sorry if I didn’t myself clear.