Smarter Week

How to automate it

How to automate “wait on slow CI builds and re-run flaky tests”

Here is the best way to spend less time on this, best first. Each comes with steps you can follow today.

30 min
typically, every day
40%
of the time can be automated
A small project
to set up

Fix 1 of 1

Process fix

Speed up CI and quarantine flaky tests

Most slow pipelines have a few big causes: no caching, tests not split, and flaky tests that force reruns. Fixing these once saves every engineer time every day.

Typically saves about 35% of the time8 h to set up
  1. 1Look at your CI timing report and find the three slowest steps.
  2. 2Turn on dependency and build caching, and run only the tests affected by the change where your tooling supports it.
  3. 3Split the test suite across parallel runners.
  4. 4Use flaky-test detection (Trunk, Buildkite Test Engine, Datadog CI Visibility or your CI's built-in) to quarantine flaky tests and open a ticket for each.
  5. 5Set a target build time and review it monthly.

Tools: GitHub Actions, GitLab CI, CircleCI or Buildkite · Trunk Flaky Tests · Datadog CI Visibility · Nx, Turborepo or Bazel caching

Who does this task

Roles in our library that list this as one of their common tasks. Each guide covers the rest of that role’s week.

HourLeak · the 8-minute work audit

How many hours does this cost you?

The free 8-minute check works out where your week goes and gives you your top fixes. The team scan does the same for everyone and adds it up, so you know which leaks to fix first.

Answers are anonymous. Leaders only see team totals.

Other common tasks for Software engineers