Using DDEV in GitLab CI Tests

September 11, 2024 1 min read

Edit this page
DDEV running in the GitLab Pipeline
Milad Fakurian (Background)

Now you can use DDEV for CI on Gitlab. Spin up your entire tech stack including services (e.g. Solr, RabbitMQ) required to run the Website within the CI. Even e2e testing is easily possible (e.g. Cypress, Playwright).

The same DDEV config can be used locally (shared across the team) and within the GitLab CI.

How can I run DDEV in GitLab CI?

GitLab CI can use Docker in Docker (DinD). With DinD, Docker can run inside the GitLab Runner using the Docker executor. With this setup, you can use DDEV in your GitLab CI setup.

(ddev/ddev-gitlab-ci) provides the needed Docker image and instructions; Some additional configuration may be required required.

Depending on your setup it requires different steps.

  • gitlab.com works with no additional configuration.
  • Self-hosted GitLab requires additional configuration for the Runner (/etc/gitlab-runner/config.toml).

On ddev/ddev-gitlab-ci, you’ll find tested configuration examples for

Once the runner is configured correctly and you have extended the .gitlab-ci.yml with a dedicated DDEV job you are good to go.

The GitLab project template for TYPO3 is using DDEV in CI already.

Note: On GitHub Actions you can do these things using ddev/github-action-setup-ddev.

Posted In