Should - checkout be invoked for every job?

Hi,

I am working on a pipeline where I see we are using the - checkout step every time, in every job.

Is it better to - checkout only once, and persist the whole repo to the workspace or checkout in every job attaching only node modules from the first job, for example?

Thanks

It will depend on what you are doing. With speed being something to look at. Checkout results in the repo being pulled down for each job, while using workspace results in a single checkout and the directory of the repo then being packaged up and then redistributed across all the different jobs.

As I use self-hosted runners I do not know how the 2 solutions compare in terms of performance.