Skip to main content
Turbo CI runs and tests only your changed dbt™ models on every pull request, before they merge. When a PR is opened, your CI provider triggers a Turbo CI Bolt schedule that builds and tests the changes in a temporary schema, and the run status shows on the pull request. Turbo CI works with GitHub, GitLab, Azure DevOps, and BitBucket.

How Turbo CI works

When a pull request is opened, your CI provider triggers a Turbo CI schedule in Paradime, which runs your configured dbt™ command against the changed models. Models build into a temporary schema using the prefix paradime_turbo_ci_pr_ followed by the commit SHA (for example, paradime_turbo_ci_pr_6d8f55c0), so you can inspect the results of your changes in your warehouse.

Prerequisites

Turbo CI runs in its own Bolt environment, so CI builds use a separate warehouse connection and target from your production runs:
  1. Create a CI environment. In Settings > Environments, click New environment and create one for CI (for example, CI). See Create and manage environments.
  2. Add a connection to it. Attach a warehouse connection to the CI environment with its target name set to ci. See the Bolt environment setup guide for your data warehouse.
  3. Point the Turbo CI schedule at it. Set the schedule’s Environment to the CI environment in schedule settings, or set environment: <ci-environment-slug> in the schedule’s YAML.
Without a dedicated CI environment, Turbo CI runs would use your default environment’s connection and target, so the ci target logic in the schema macro below would never engage.

Already running Turbo CI with --target ci?

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

Configure a custom schema for CI runs

Update your dbt™ generate_schema_name.sql macro so that, when a Bolt run uses the ci target, models build into a temporary schema with the paradime_turbo_ci_pr prefix. In your project’s macros folder, create generate_schema_name.sql:
See the dbt custom schemas documentation.

Configure the Turbo CI job

A Turbo CI job is a Bolt schedule with a few additions:
  • Its environment set to your CI environment, so runs use the CI connection and ci target.
  • A production schedule to defer to, so state comparison can determine what changed.
  • commands that use the state:modified+ selector to build and test only new and changed models.
  • A trigger set to run when a pull request is opened.

Test Code Changes On Pull Requests

Set up your CI pipeline

Once the shared setup above is in place, wire up Turbo CI in your provider:

GitHub

GitLab

Azure DevOps

BitBucket