Skip to main content

Eddy

Eddy is a template for maintaining a contributed Drupal module or theme on GitHub. An extension started from it gets CI on GitHub Actions, a local Drupal site, coding standards checks and mirroring to Drupal.org.

You write the extension, and Eddy provides the rest. Your machine builds the site with the same commands that CI runs, so a run that passes locally is likely to pass in CI too.

Building a website?

To build a Drupal website, use Vortex. The 2 templates do separate jobs, and a repository uses only 1 of them.

What you get​

  • ⚙️ CI on GitHub Actions - PHP 8.3 to 8.5 and Drupal stable on 10, 11 and 12, plus legacy and canary tiers on 11 and 12. The version matrix explains the tiers. Code coverage comes from pcov, and goes to codecov.io when you add a CODECOV_TOKEN repository secret. With 1 override, the setup works with Drupal.org GitLab CI too.
  • 💻 Local development - a site built from drupal/recommended-project on your host's PHP. The same tooling commands build it locally and in CI, and you run them through make, Ahoy or directly. The build sets up a module or a theme and applies your patches. It also adds the development dependencies from composer.dev.json and the extensions you suggest.
  • 🧹 Coding standards - PHPCS with the Drupal, DrupalPractice, DrevOps and PHPCompatibility standards, PHPStan with PHPStan Drupal, Drupal Rector, Twig CS Fixer, ESLint, Stylelint, CSpell and Prettier.
  • 🧪 Tests - PHPUnit Unit, Kernel, Functional and FunctionalJavascript tests, in a local Chrome or a Selenium container, and JavaScript tests with Jest.
  • 🚚 Deployment - mirroring of the code and its tags to Drupal.org or another git remote after CI passes. The destination branch can differ from the source branch.
  • 🤖 Renovate - grouped pull requests that keep npm packages, GitHub Actions and Docker images up to date. You update the Composer constraints in composer.json by hand.
  • 📝 Docs for your extension - README.md and CONTRIBUTING.md templates.

Eddy tests itself the way it tests a project created from it, and deploys to drevops/eddy_destination as a working example.

How it fits together​

Your repository holds the extension and a few configuration files. The commands that assemble, run and deploy it come from the drevops/eddy-tooling package, and both your machine and CI call them:

A quick look​

Installation covers every step, from the download to the first deployment. The tabs on this site hold the commands for each setup: Make, Ahoy or no command wrapper. In a new, empty directory, the first run looks like this:

curl -fsSL https://eddy.drevops.com/install > install.php
php install.php # Answer the questions about your extension
make build # Assemble the codebase, start the server, install Drupal
make lint # Check coding standards
make test # Run the tests

Where to next​