Gitlab-CI introduced a flexible and powerful CI solution. My project Giltab CI fo Drupal 8 is meant to ease the integration with a Drupal 8 project.
It is now ready to handle a single module or theme and provide a full pipeline for your testing.
Here is a brief article to integrate Gitlab-CI with your module in probably less than 10 minutes!
This CI includes Drupal testing (Unit, Functional, Functional JavaScript, Nightwatch.js), code quality for PHP, JavaScript, CSS, Sass and some metrics for your PHP code.
Full version include Behat tests, Pa11y accessibility tests, a sample of deploy but this is not used in this tutorial.
Installation
From my project, download the code: https://gitlab.com/mog33/gitlab-ci-drupal
Extract and copy .gitlab-ci.yml
and the.gitlab-ci
folder at the root of your module.
Go to Gitlab Settings > CI/ CD > Variables and add those variables (first one is empty!):
Create a branch testing
and push your module code to Gitlab.
Check the pipelines menu on your Gitlab !
If you want to choose when to run the CI, for example on a branch master or on a tag, adapt the section with:
Et VoilĂ !
More information on the project page : https://gitlab.com/mog33/gitlab-ci-drupal