Skip to content

ci: consolidate node-ci checks into one job to cut billed minutes - #41

Merged
domengabrovsek merged 1 commit into
mainfrom
ci/consolidate-node-ci-jobs
Aug 17, 2026
Merged

ci: consolidate node-ci checks into one job to cut billed minutes#41
domengabrovsek merged 1 commit into
mainfrom
ci/consolidate-node-ci-jobs

Conversation

@domengabrovsek

Copy link
Copy Markdown
Owner

Why

GitHub bills every Actions job a 1-minute minimum, even for a sub-second check. The shared node-ci.yml ran lint / format / typecheck / test / build as five separate jobs (plus an internal gate), each re-running npm 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

  • Collapse the five check jobs into one checks job that runs npm ci once, then each check as a continue-on-error step.
  • A final Verify step fails the job if any check failed - so every check still runs and shows individually in the log, only the wasted per-job install + minute-rounding is gone.
  • Drop the redundant internal gate job (consumers already aggregate this reusable in their own Gate check).

Impact

  • Jobs per run: 7 -> 2 (checks + optional actionlint).
  • npm ci runs once instead of 5x.
  • Propagates to all spoke repos automatically (they pin @main).
  • Estimated ~70% cut on spoke-repo CI minutes.

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.

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).
@domengabrovsek
domengabrovsek merged commit 9a86dc4 into main Aug 17, 2026
10 checks passed
@domengabrovsek
domengabrovsek deleted the ci/consolidate-node-ci-jobs branch August 17, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant