Run the job before the queue
With Trunk Merge Queue, set the job to Run Before Queue (beta) in Configuration → Jobs. Dynamic CI still skips it on most pushes, but Trunk makes sure it has run before the pull request enters the merge queue, so a break is caught on the pull request rather than evicting it from the queue and restarting tests on other merge items.- On any commit runs the job once unless it already passed on a commit of the pull request. Use it for quick jobs such as unit tests. Slow suites hold the pull request longer before the queue tests it; see Set up each kind of job.
- On the head commit runs the job on the exact commit that enters the queue. Use it for lightweight freshness checks.
Send your build tool’s impact
Dynamic CI can’t see how much of your codebase a change reaches. If your build tool can, such as a count of affected packages from Nx, Bazel or Turborepo, send it with each plan request. Dynamic CI then runs jobs on broad changes and leans toward skipping narrow ones. Each impact is a JSON list with one entry per measure:source: your name for the measure: lowercase letters, digits,.,_and-. Keep it the same on every run.count: a whole number. Send0when nothing is affected.all: truein place ofcountwhen everything is affected. A job runs on such a change unless it already passed on that commit.
- GitHub Actions
- Buildkite
Pass the list in the action’s
impacts input (v0.1.7 or later; @v1
has it), from an earlier step or job that computed it: