Quickly setup Gtilab-CI with your Drupal 8 module
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!
Full version include Behat tests, Pa11y accessibility tests, a sample of deploy but this is not used in this tutorial.
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:
.test_except_only: &test_except_only except: refs: - master variables: - $SKIP_TESTS == "1" only: refs: - testing - tags
Et Voilà !
More information on the project page : https://gitlab.com/mog33/gitlab-ci-drupal