Fetching the full repository anew everytime in CI takes too long
In the title of this bug, when I say it "takes too long" I mean in context of each CI job. Say a lint job that takes 3min to run, spends 2:30min just fetching the repository.
Gitlab does a shallow clone of depth 50, but everytime it fetches a fresh copy of the repository which is likely unnecessary.
This ticket is for looking into caching the repository on the first run of the pipelines and then reusing that first fetch in subsequent runs for a given branch.
Now that I write this I figure maybe we don't even need to fetch a fresh repository for each job -- we can investigate if it's possible to fetch once and reuse the same clone in subsequent jobs.
Another option here is to use git sparse checkouts.