I have a project, where I have to install JS and PHP dependencies using “npm install” resp. “composer install”. I would also like to run multiple jobs in parallel, but for all of them installing both kind of dependencies is requried.
I have already seen that you can use artifacts to share stuff between jobs, but they will be stored somewhere, and this storage is limited (so I guess I would have to periodically delete the old artifcats). Alternatively the cache action could be used, which also has a very low storage limit.
In addition to the npm and composer calls, I also need to checkout our code. If I am using the above solution, I would have to checkout the code for every job I create again, and get the node_modules and vendor folder using cache or artifacts.
Now I am wondering if it is possible to branch or clone a job. I would imagine that like a process fork. My idea would be that I checkout my project, install all dependencies, and continuing from there I am forking the job. This would allow me to run jobs in parallel, without the hassle of caching or creating artifacts and checking out the project again for every job.