Skip to main content
Turbo CI runs and tests only the dbt™ models you changed on each pull request, in a temporary schema, before they merge. This guide covers the shared setup (a dedicated CI environment, a schema macro, and a Turbo CI job), then points you to your git provider to finish.
Prerequisites
  • An Admin role in Paradime.
  • A production Bolt schedule to defer against (Turbo CI uses state comparison to detect changes).
  • Admin access to your git provider (GitHub, GitLab, Azure DevOps, or BitBucket).
Estimated time: 30 minutes.

Already running Turbo CI with --target ci?

Follow the migration guide to move to a dedicated CI environment and drop the --target ci flags.

Steps

1

Create a dedicated CI environment

Turbo CI runs in its own Bolt environment so CI builds use a separate connection and target from production. In Settings > Environments, create a new environment (for example, CI), then add a warehouse connection to it with its target name set to ci. See Create and manage environments.
Without a dedicated CI environment, Turbo CI would use your default environment’s target, so the ci logic in the schema macro below never engages.
2

Add a custom schema macro

So CI runs build into an isolated, temporary schema, add a generate_schema_name.sql macro to your project’s macros folder. When the target is ci, models build into a schema prefixed paradime_turbo_ci_pr_ (followed by the PR number):
3

Create the Turbo CI job

Create a Bolt schedule of type Turbo CI, with:
  • Its Environment set to the CI environment you created, so runs use the CI connection and ci target.
  • A production schedule to defer to, so state comparison knows what changed.
  • Commands that use the state:modified+ selector to build and test only new and changed models, for example dbt build --select state:modified+. The environment supplies the ci target, so you do not append --target ci.
  • A trigger set to run when a pull request is opened.
The Test code changes on pull requests template gives you a ready-made starting point.
4

Connect your git provider

Finish by wiring Turbo CI into your provider, which triggers the job on each PR and posts the status back:

GitHub

GitLab

Azure DevOps

BitBucket

Open a pull request that changes a model. Turbo CI runs, builds the changed models into a paradime_turbo_ci_pr_<number> schema, and the run status appears on the PR. On GitHub, a DinoAI summary is posted automatically if the run fails.

Next steps

Turbo CI reference

The full setup, environment variables, and schema cleanup.

Schedule types and triggers

How the Turbo CI type and PR trigger fit together.