ci: consolidate node-ci checks into one job to cut billed minutes - #41
Merged
Conversation
GitHub bills every job a 1-minute minimum. The reusable ran lint, format, typecheck, test and build as five separate jobs, each re-running npm ci, so a sub-second check suite cost 5+ billed minutes per run across every spoke repo. Collapse them into one 'checks' job that installs once and runs each check as a continue-on-error step, with a final Verify step that fails on any failure. Every check still runs and shows individually in the log. Drop the now-redundant internal gate job (consumers aggregate this workflow in their own Gate).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
GitHub bills every Actions job a 1-minute minimum, even for a sub-second check. The shared
node-ci.ymlran lint / format / typecheck / test / build as five separate jobs (plus an internal gate), each re-runningnpm ci. So a check suite that does seconds of real work cost 5-6 billed minutes per run - multiplied across every spoke repo that uses this reusable (real-estate, tax-calculator, personal-api, personal-app, personal-website, shupak-bot, parketarstvo).This was a top driver of the account blowing through its 2000 free minutes in days.
What changed
checksjob that runsnpm cionce, then each check as acontinue-on-errorstep.gatejob (consumers already aggregate this reusable in their own Gate check).Impact
npm ciruns once instead of 5x.@main).Trade-off
Checks now run sequentially in one job rather than in parallel. Each is sub-second after a single install, so wall-clock is comparable. Per-check branch-protection status entries are lost, but these private repos are on the Free plan and cannot use required status checks anyway.