Small lint, format and typecheck jobs each take 40 seconds of setup for 10 seconds of work. Should you merge them?
BeginnerScenarioSpeed, Caching & Cost
Answer
Situation read → Per-job overhead dominates.
What I'd do →
- Merge into one
static-checksjob with sequential steps, each named clearly. - Use
if: ${{ !cancelled() }}on later steps so all checks report even if one fails. - Keep long, independent suites (unit tests, build) as separate parallel jobs.
Why → Each job pays VM allocation, checkout, setup and cache restore.
Interview tip → "Fat jobs for tiny tasks, parallel jobs for long ones."
More on Speed, Caching & Cost
`npm ci` takes 4 minutes on every run. Fix it.BeginnerDocker builds take 12 minutes even when only one line of code changed. Speed them up.IntermediateThe repo hits the 10 GB cache limit daily and hit rates are poor. What do you change?IntermediatemacOS jobs are 60% of your bill. What are your options?IntermediateA job sometimes hangs and burns 6 hours. How do you stop it happening again?BeginnerYour PR matrix is 3 OS times 4 versions (12 jobs). How do you cut cost without losing coverage?Advanced