- Issue created by @useernamee
- ๐ธ๐ฎSlovenia miha.wagner
miha.wagner โ made their first commit to this issueโs fork.
- Merge request !19#3495008 Add .gitlab-ci for continious integration โ (Open) created by miha.wagner
- ๐ธ๐ฎSlovenia miha.wagner
I've added a .gitlab-ci.yml file, basically using Drupal's template for the Drupal Gitlab. Also added support for ddev-drupal-contrib for easier development, the setup for which is described in CONTRIBUTING.md.
Basically with the ddev plugin phpstan and phpcs can run with all the dependencies, as if the module would be installed on a Drupal site. Added a phpstan baseline file since fixing all the issues regarding that is out of the scope of this issue.
Additionally if
composer install
is run and the ddev instance created as described in CONTRIBUTING.md, pre-commit hooks will be run warning you of any issues before pushing, so as to not have to rely on the pipelines for this.Think this is a good way to improve the developer experience, as now all work can be done in the repository, instead of needing to have a project ready and then e.g. doing the work by adding the module through composer from source.
Using all this is not required though and the developer can still choose to just change the code and commit, and be warned only when the pipeline fails, but the option to develop locally in a fully working environment is there.