Add .gitlab-ci for continious integration

Created on 19 December 2024, 27 days ago

Problem/Motivation

Improve developer XP.

๐Ÿ“Œ Task
Status

Active

Version

1.5

Component

Code

Created by

๐Ÿ‡ธ๐Ÿ‡ฎSlovenia useernamee Ljubljana

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @useernamee
  • ๐Ÿ‡ธ๐Ÿ‡ฎSlovenia miha.wagner

    miha.wagner โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ธ๐Ÿ‡ฎ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.

Production build 0.71.5 2024