docs/current_docs/adopting/triggers/circleci.mdx
CircleCI can run dagger check in any workflow, so the same checks you run locally run on every push — without rewriting your pipeline.
:::tip
For checks with no workflow YAML at all, enable Cloud Checks with dagger ws autocheck on. The CircleCI workflow below is the hybrid-mode alternative for when you want to drive Dagger from your existing CircleCI setup.
:::
When running a CI pipeline with Dagger using CircleCI, the general workflow looks like this:
.circleci/config.yml workflow file.dagger check against the modules installed in your workspace.DAGGER_CLOUD_TOKEN environment variable is set.:::note In a Dagger context, you won't have access to CircleCI's test splitting functionality. You will need to implement your own test distribution logic or run all tests in a single execution. :::
.dagger/config.toml) — see Workspace Setup.dockerThe example below uses the docker executor, which comes with a Docker execution environment preconfigured. If using a different executor, such as machine, you must install Docker in the execution environment before proceeding.
The following example runs all of your workspace's checks with dagger check:
dagger check runs every check and exits non-zero if any fails. You can scope it to a subset — for example dagger check go:* to run a single module's checks.
By default the Dagger CLI starts a Dagger Engine inside the CircleCI runner. For a faster, more reliable experience, offload execution to a managed Dagger Engine provided by Dagger Cloud by adding --cloud to the command:
dagger check --cloud
Cloud Engines provide a large persistent cache shared across runs and far more compute than a CircleCI runner, so checks are typically much faster — and you don't provision or maintain any infrastructure. This requires the DAGGER_CLOUD_TOKEN environment variable to be set in your CircleCI project.
If you have any questions about additional ways to use CircleCI with Dagger, join our Discord and ask your questions in our help channel.
CircleCI is a popular CI/CD platform to test, build and deploy software applications.