Gitlab CI for a Drupal module / theme or full project.
Include Build, Testing, Code quality, Metrics and more...
For any issue, please use the Gitlab-CI project page
Based on an include behavior, ie you don't have to copy all files from this project.
- Gitlab CI with a runner that support docker
- Minimal understanding of Gitlab CI and Gitlab CI Yaml
Push your module / theme to a Gitlab with CI and runners enabled.
Gitlab.com offer some CI pipeline minutes/month on free accounts.
- Copy starter.gitlab-ci.yml
file as a
.gitlab-ci.yml
at the root of your Drupal module or theme (same level asmy_module_or_theme.info.yml
file). - If your project is not on Gitlab.com, edit the
include
section et the beginning. - Edit the
variables
and uncomment the section underOverride default variables for a module
- Create and push your branch, see the pipeline running for basic code standard and lint.
External module demo, real module example Content moderation edit notify
For more option and details see the full documentation.
Push your project to a Gitlab with CI and runners enabled.
Gitlab.com offer some CI pipeline minutes/month on free accounts.
Assuming your project include a composer.json
file from the
Drupal project.
- Copy starter.gitlab-ci.yml file as a
.gitlab-ci.yml
in your project - If you are using Behat you must add your tests in a
behat_tests
folders at the root of your Drupal project (same level ascomposer.json
file).- As a starting point you can look in the behat_tests folder of this project.
- Put your custom code in the
web/modules/custom
andweb/themes/custom
folders of your project. - Create and push your branch, see the pipeline running for basic code standard, lint, tests and metrics.
External project demo.
As an example you can check my project on a Drupal template: Drupal project advanced template
For more option and details see the full documentation.
Want some help implementing this on your project? I provide Drupal expertise as a freelance, just contact me.
If you want to support this project, you can: