Search code examples
pythongithubcontinuous-integrationgithub-actions

Best practices for using workflows in Github Actions


Github Actions provides multiple options to run different commands on the source code. I am wondering about the best practices on when to create multiple workflows, multiple jobs vs multiple steps.

For example, I use GitHub actions for a python project and I want to run a test and lint-check using Github actions. Should I create two separate workflows for this? Or two separate jobs on the same workflow? or even two separate steps in the same job?

How should I decide between those?


Solution

  • I would recommend the lecture on this article about CI/CD Best practices. There is no right answer, it will most of the time depends on the context you are working with, and your concerns regarding performance, time of execution, metrics, maintenance, and so on... I suggest in your case to test both ideas and see which one looks the best in your context

    PS: As this is not answered I take this answer from @GuiFalourd as the answer.