tokenwise.sk
← Back to Articles
· 5 min read

We ran out of CI minutes in nine days. Here is the pipeline we built next.

A shared GitHub Actions allowance ran out nine days into October and stopped our site deployments. We changed which tests run and began reusing verified builds. Here is the implementation, its safeguards and the results still to measure.

A colossal dark dam wall at night with a thin orange line of light along its crest, seen from the dry, cracked reservoir bed.
AI-generated editorial illustration.

On 9 October 2026, our continuous integration and site deployments stopped. The shared GitHub organisation allowance of 3,000 included Actions minutes had run out, and an already-merged change was left waiting to go live.

The allowance covered the organisation, rather than a separate 3,000-minute allocation for each repository. Our marketing site, factory-web, was the largest consumer in the internal cost review. That distinction matters when several products share one account.

We enabled a $15 metered budget with a stop-usage cap the next day. We also changed the work each commit asked the pipeline to do.

Small changes were paying for unrelated tests

The October review found two sources of repeated work: a higher number of runs, and longer runs that included checks for products outside the change.

One example in the decision record was a one-line copy change. Because it touched a shared dictionary, it triggered a full regression of roughly seventeen minutes, alongside unrelated product jobs.

Another repeated cost came after merging. The pull request had passed its checks; the same file tree reached main; the pipeline tested it again.

For a founder, that meant a small request could still spend time waiting for a large set of checks. We needed an explicit rule for which checks a change requires.

Give the pipeline a map

We committed a map from file paths to test areas.

A change under content/articles/ selects the article checks. A pricing change selects the pricing checks. Changes to broadly shared inputs, such as authentication or dependency configuration, require the full regression. A path the map does not recognise, or a diff the selector cannot compute, also triggers the full run.

There are explicit exceptions for common changes across pages. The header, layouts, global stylesheet and copy dictionary select a smaller smoke set. Frontend changes also receive shared navigation and smoke checks.

This is a choice about coverage. It needs review just as code does. The fallback catches unrecognised inputs; it cannot detect every missing dependency between areas that the map already recognises.

Keep the result of a check

When a pull request passes CI, we record the exact file tree it tested.

After the merge, the pipeline compares the tree on main with that record. If they match, it can skip repeating those checks and continue to deployment. If the tree changed, the earlier result does not apply automatically.

The identity of the tested content is the useful evidence. A green check on a nearby commit is not enough.

Keep the build as well

We then applied the same rule to the site export.

A successful hosting pull request produces a build artifact with its tree, commit, workflow run and attempt recorded. The deployment job can reuse that exact export after validating its provenance and required files.

If the artifact is missing or its verification fails, deployment builds a fresh export. Reuse depends on a valid match.

This also gives us a more specific question to measure: how often did a deploy reuse an already-tested build, and how much build time did that avoid?

Start fewer unnecessary runs

Several smaller rules reduce the number of runs before test selection starts.

Draft pull requests trigger no jobs. A task stays in one pull request, and local checks run before a branch is marked ready. Development-documentation-only pushes to main skip the workflow, while documentation pull requests still report the required merge check.

Release tooling for products that moved out of this repository is excluded from its selection. A separate cache-retention workflow defaults to a read-only plan and checks each candidate again before an explicitly requested cleanup.

These rules need to be maintained alongside the path map. Moving a product or adding a shared component can change what the pipeline should check.

What the records support

The internal October cost snapshot recorded factory-web as $15.61 of $21.60 in gross Actions charges. That is a historical figure from our engineering records. We are not presenting it as a reconciled invoice for the entire month or as a measured saving caused by this change.

The reuse mechanism reports an estimate of build time avoided, derived from the pull request's measured build seconds. Those seconds are useful operational evidence. They do not establish an equivalent reduction in billed minutes or euros.

The comparison described in our records covers ten matched releases, with the same runner and workload baseline. This article does not report a completed result from that comparison.

What we can point to now is the implementation: test selection, exact-tree verification and reuse of a verified export. The billing effect still needs its own measurement.

Where this approach can fail

A mapped change can affect another area whose tests were not selected. A new feature can introduce a shared dependency the map does not describe. Periodic broader checks and review of the map remain necessary.

Build reuse also has limits. A changed base, a different tree, an expired artifact or a failed provenance check can require a fresh build.

This is one team's engineering experience. The account's included allowance, spending cap and runner billing make cost-per-change attribution difficult. We can identify repeated work and measure job durations; we still need evidence before assigning a monetary saving to each merge.

Before increasing your own CI budget, inspect what a small change actually runs. A useful first improvement may be a clear map, an explicit fallback and a record of exactly what was already checked.

Describe your project on Tokenwise to start the existing project chat.

Source: Tokenwise's internal GitHub Actions decision records dated 9–10 October 2026, the current factory-web CI documentation and test-selection code, and its verified hosting-export implementation. Historical account usage and recorded spend are distinguished from estimated build time avoided. AI-assisted text; AI-generated editorial illustration.