Eddy
Eddy is a template for maintaining a contributed Drupal module or theme on GitHub. Start your extension from it and you get CI on GitHub Actions, a local Drupal site to develop and test against, coding standards checks and mirroring of the code to Drupal.org.
You write the extension, and Eddy provides the rest. The commands that build the site on your machine are the same commands CI runs, so a run that passes locally is likely to pass in CI too.
Eddy isn't for building websites: use Vortex for that. The 2 templates do separate jobs, and a repository uses only 1 of them.
What you get
- ⚙️ CI on GitHub Actions - PHP
8.3,8.4and8.5, and 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 the PHP of your host, by the same tooling commands that CI runs. 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 any other git remote, after CI passes, optionally to a different destination branch.
- 🤖 Renovate - grouped pull requests that keep npm packages, GitHub Actions and Docker images up to date. It leaves Composer packages for you to update by 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. Each set of tabs on this site shows the commands for 1 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? Update your extension brings it up to date, and Upgrade a 4.x project to 5.x covers the move from 4.x.
- Looking for examples? The projects using Eddy are on the home page.