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 brings the machinery around it. The commands that build the site on your machine are the same commands CI runs, so a passing local run tells you something real about the next CI run.
Eddy isn't for building websites: use Vortex for that. The 2 templates do separate jobs, and a repository uses 1 or the other, never both.
What you get
- ⚙️ CI on GitHub Actions - PHP
8.3,8.4and8.5, and Drupalstableon 10, 11 and 12, pluslegacyandcanarytiers on 11 and 12. Code coverage comes from pcov and goes to codecov.io, and 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, through
makeor Ahoy. It builds a module or a theme, adds the development dependencies fromcomposer.dev.jsonand the extensions yousuggest, and applies your patches. - 🧹 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, once CI passes, optionally to a different destination branch.
- 🤖 Renovate - grouped pull requests that keep dependencies up to date.
- 📝 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. Once Eddy is in a new directory, it comes down to this:
- Make
- Ahoy
- No wrapper
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
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
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.
Projects using Eddy
- Testmode - Drupal module to alter existing site content and other configurations when running tests.
- Generated Content - Drupal module to programmatically generate content.
- Integration Report - Drupal module to report on availability status of 3rd party endpoints.
- Drupal Helpers - Helper utilities for Drupal.
- Deploy_Steps - Runs repeatable run-on-every-deploy logic as discoverable plugins.
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? Updating brings your extension up to date, and Upgrading from 4.x handles the jump to 5.x.