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.
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.3to8.5and Drupalstableon 10, 11 and 12, pluslegacyandcanarytiers on 11 and 12. The version matrix explains the tiers. Code coverage comes from pcov, and goes to codecov.io when you add aCODECOV_TOKENrepository 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 fromcomposer.dev.jsonand the extensions yousuggest. - 🧹 Coding standards - PHPCS with the
Drupal,DrupalPractice,DrevOpsandPHPCompatibilitystandards, 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.jsonby hand. - 📝 Docs for your extension -
README.mdandCONTRIBUTING.mdtemplates.
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:
- Make
- Ahoy
- No wrapper
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
curl -fsSL https://eddy.drevops.com/install > install.php
php install.php # Answer the questions about your extension
ahoy build # Assemble the codebase, start the server, install Drupal
ahoy lint # Check coding standards
ahoy test # Run the tests
curl -fsSL https://eddy.drevops.com/install > install.php
php install.php # Answer the questions about your extension
scripts/eddy-tooling # Install the tooling
vendor/bin/eddy-assemble # Assemble the codebase
vendor/bin/eddy-start # Start the PHP server
vendor/bin/eddy-provision # Install Drupal
# Lint and test with the commands that your CONTRIBUTING.md lists.
Where to next
- New to Eddy? Start with Installation.
- Working on an extension that already uses Eddy? Development covers the daily commands.
- On an older Eddy release? Follow Update your extension, or Upgrade a 4.x project to 5.x for a project created from 4.x.
- Looking for examples? The projects using Eddy are on the home page.