Skip to content

Continuous integration

This extension wants to make it easy to roll out CI process for your Drupal application.

Supported platforms and workflows

  • GitHub Actions
    • Automatic upgrades with a pull request
    • Composer diff

GitHub Actions

Automatic upgrades with a pull request

This workflow does the following:

  1. Sets up all sites using each site's configured setup strategy.
  2. Runs the configured Drupal upgrade strategy.
  3. For each site, runs database updates and exports configuration (if applicable).
  4. Creates a pull request with the changes.
Pre-requisites
DDEV

The OOTB workflow file assumes the project uses DDEV, and it executes commands via DDEV in the workflow.

Create or reuse a custom GitHub application

You will need to have a custom GitHub application configured with the following permissions:

  • Read access to members and data
  • Read and write access to code and pull requests

Ensure to enable the application for the repository for your project.

We need to create two repository secrets: DP_PR_APP_ID and DP_PR_APP_KEY. The DP_PR_APP_ID is the ID of the GitHub application. The DP_PR_APP_KEY is a private key associated with the GitHub app.

SSH key

Finally, you need to add a repository secret, SSH_KEY, that contains a private SSH key. You should only need this if any of your site setup strategies depend on having this SSH key available.

Composer diff

This workflow runs on every pull request that contains changes to composer.lock. It will post, as a sticky comment on the pull request, a table with a row for each package changed with the following fields:

  • Package name
  • Change type
  • Previous version
  • New version
  • Link to package changes code diff (Drupal packages are supported!)

It relies on the Composer Diff plugin to generate a version diff of the changes made to the composer.lock file.

Example Composer diff table of changes
Prod Packages Operation Base Target Link
composer/installers Upgraded v2.2.0 v2.3.0 Compare
digitalpolygon/drupal-upgrade-plugin Changed dev-main 87f2362 1.0.0-beta1 Compare
doctrine/annotations Upgraded 1.14.3 1.14.4 Compare
doctrine/deprecations Upgraded 1.1.3 1.1.4 Compare
drupal/core Upgraded 10.3.0 10.4.3 Compare
drupal/core-composer-scaffold Upgraded 10.3.0 10.4.3 Compare
drupal/core-project-message Upgraded 10.3.0 11.1.3 Compare
drupal/core-recommended Upgraded 10.3.0 10.4.3 Compare
egulias/email-validator Upgraded 4.0.2 4.0.3 Compare
guzzlehttp/guzzle Upgraded 7.8.2 7.9.2 Compare
guzzlehttp/psr7 Upgraded 2.6.3 2.7.0 Compare
mck89/peast Upgraded v1.16.2 v1.16.3 Compare
pear/pear-core-minimal Upgraded v1.10.15 v1.10.16 Compare
symfony/dependency-injection Upgraded v6.4.16 v6.4.19 Compare
symfony/error-handler Upgraded v6.4.8 v6.4.19 Compare
symfony/http-foundation Upgraded v6.4.8 v6.4.18 Compare
symfony/http-kernel Upgraded v6.4.8 v6.4.19 Compare
symfony/mailer Upgraded v6.4.8 v6.4.18 Compare
symfony/mime Upgraded v6.4.8 v6.4.19 Compare
symfony/polyfill-ctype Upgraded v1.29.0 v1.31.0 Compare
symfony/polyfill-iconv Upgraded v1.29.0 v1.31.0 Compare
symfony/polyfill-intl-grapheme Upgraded v1.29.0 v1.31.0 Compare
symfony/polyfill-intl-idn Upgraded v1.29.0 v1.31.0 Compare
symfony/polyfill-intl-normalizer Upgraded v1.29.0 v1.31.0 Compare
symfony/polyfill-mbstring Upgraded v1.29.0 v1.31.0 Compare
symfony/polyfill-php83 Upgraded v1.29.0 v1.31.0 Compare
symfony/process Upgraded v6.4.15 v6.4.19 Compare
symfony/psr-http-message-bridge Upgraded v6.4.8 v6.4.13 Compare
symfony/routing Upgraded v6.4.8 v6.4.18 Compare
symfony/serializer Upgraded v6.4.8 v6.4.19 Compare
symfony/validator Upgraded v6.4.8 v6.4.19 Compare
symfony/var-exporter Upgraded v6.4.13 v6.4.19 Compare
twig/twig Upgraded v3.10.3 v3.19.0 Compare
symfony/polyfill-php72 Removed v1.31.0 - Compare
symfony/polyfill-php80 Removed v1.31.0 - Compare
Dev Packages Operation Base Target Link
behat/mink Upgraded v1.11.0 v1.12.0 Compare
brick/math New - 0.12.3 Compare
composer/ca-bundle Upgraded 1.5.1 1.5.5 Compare
composer/class-map-generator Upgraded 1.3.4 1.6.0 Compare
composer/composer Upgraded 2.7.7 2.8.6 Compare
composer/pcre Upgraded 3.2.0 3.3.2 Compare
drupal/coder Upgraded 8.3.24 8.3.28 Compare
drupal/core-dev Upgraded 10.3.0 10.4.3 Compare
google/protobuf Upgraded v3.25.4 v4.29.3 Compare
ion-bazan/composer-diff Upgraded v1.9.1 v1.11.0 Compare
mglaman/phpstan-drupal Upgraded 1.2.12 1.3.3 Compare
mikey179/vfsstream Upgraded v1.6.11 v1.6.12 Compare
myclabs/deep-copy Upgraded 1.12.0 1.13.0 Compare
nyholm/psr7-server New - 1.1.0 Compare
open-telemetry/api Upgraded 1.0.3 1.2.2 Compare
open-telemetry/context Upgraded 1.0.2 1.1.0 Compare
open-telemetry/exporter-otlp Upgraded 1.0.4 1.2.0 Compare
open-telemetry/gen-otlp-protobuf Upgraded 1.1.0 1.5.0 Compare
open-telemetry/sdk Upgraded 1.0.8 1.2.2 Compare
open-telemetry/sem-conv Upgraded 1.25.0 1.30.0 Compare
php-http/discovery Upgraded 1.19.4 1.20.0 Compare
php-http/guzzle7-adapter Upgraded 1.0.0 1.1.0 Compare
php-http/httplug Upgraded 2.4.0 2.4.1 Compare
phpdocumentor/reflection-docblock Upgraded 5.4.1 5.6.1 Compare
phpdocumentor/type-resolver Upgraded 1.8.2 1.10.0 Compare
phpspec/prophecy Upgraded v1.19.0 v1.20.0 Compare
phpspec/prophecy-phpunit Upgraded v2.2.0 v2.3.0 Compare
phpstan/extension-installer Upgraded 1.4.1 1.4.3 Compare
phpstan/phpdoc-parser Upgraded 1.29.1 2.1.0 Compare
phpstan/phpstan Upgraded 1.11.10 1.12.19 Compare
phpstan/phpstan-deprecation-rules Upgraded 1.2.0 1.2.1 Compare
phpstan/phpstan-phpunit Upgraded 1.4.0 1.4.2 Compare
phpunit/php-code-coverage Upgraded 9.2.31 9.2.32 Compare
phpunit/phpunit Upgraded 9.6.20 9.6.22 Compare
ramsey/collection New - 2.0.0 Compare
ramsey/uuid New - 4.7.6 Compare
sirbrillig/phpcs-variable-analysis Upgraded v2.11.19 v2.11.22 Compare
slevomat/coding-standard Upgraded 8.15.0 8.16.0 Compare
squizlabs/php_codesniffer Upgraded 3.10.2 3.11.3 Compare
symfony/browser-kit Upgraded v6.4.8 v6.4.19 Compare
symfony/css-selector Upgraded v6.4.8 v6.4.13 Compare
symfony/dom-crawler Upgraded v6.4.8 v6.4.19 Compare
symfony/lock Upgraded v6.4.8 v6.4.13 Compare
symfony/phpunit-bridge Upgraded v6.4.10 v6.4.16 Compare
symfony/polyfill-php80 New - v1.31.0 Compare
symfony/polyfill-php82 Upgraded v1.30.0 v1.31.0 Compare
symfony/stopwatch Upgraded v6.4.8 v7.2.4 Compare
tbachert/spi New - v1.0.2 Compare

Initializing workflows

Currently, you can initialize the workflows by running polymer drupal:workflow:generate github. This will place the supported workflows in .github/workflows/.