You also have to set up your environment with the tool [l3d](../docker/l3d/index.md). The composer plugin
[Drupal Development Environment](../composer/plugin/drupal-dev-environment/index.md) does all the setup for you.
This can be executed out of the box using [Ahoy](../../plugin/ahoy/index.md) by using the shortcut `a`.
## Drupal Dependency Analysis
...
...
@@ -97,7 +98,14 @@ You can just execute:
a test phpcs-fix <contrib_module>
```
Now th errors are gone, which saves a lot of time and effort.
Now the errors are gone, which saves a lot of time and effort.
#### Using PHPCS in a GitLab pipeline
The easiest way is to use our templates for a GitLab pipeline. They can be found [here](https://gitlab.lakedrops.com/gitlab-ci-cd/drupal).
To take advantage of the Drupal optimized pipelines we make heavy use of the [GitLab Templates](https://www.drupal.org/project/gitlab_templates) project.
Here you find more information of using [PHPCS in a pipeline](https://project.pages.drupalcode.org/gitlab_templates/jobs/phpcs/).
### PHPStan
...
...
@@ -133,6 +141,14 @@ a test phpstan <file_ordirectory>
Whether it is a directory, it runs the analysis for everything under this directory
recursively.
#### Using PHPStan in a GitLab pipeline
The easiest way is to use our templates for a GitLab pipeline. They can be found [here](https://gitlab.lakedrops.com/gitlab-ci-cd/drupal).
To take advantage of the Drupal optimized pipelines we make heavy use of the [GitLab Templates](https://www.drupal.org/project/gitlab_templates) project.
Here you find more information of using [PHPStan in a pipeline](https://project.pages.drupalcode.org/gitlab_templates/jobs/phpstan/).
### PHP Lint
You can execute [PHP Lint](https://github.com/overtrue/phplint) for a specific Drupal contrib module:
...
...
@@ -227,6 +243,16 @@ If you want to analyse a custom module, just do the following:
a test stylelintmodule ../custom/<custom_module>
```
#### Using Stylelint in a GitLab pipeline
The easiest way is to use our templates for a GitLab pipeline. They can be found [here](https://gitlab.lakedrops.com/gitlab-ci-cd/drupal).
To take advantage of the Drupal optimized pipelines we make heavy use of the [GitLab Templates](https://www.drupal.org/project/gitlab_templates) project.
Here you find more information of using [Stylelint in a pipeline](https://project.pages.drupalcode.org/gitlab_templates/jobs/stylelint/).
### ES Lint
This is another useful tool to test your `css` files.
...
...
@@ -241,6 +267,27 @@ If you want to analyse a custom module, just do the following:
a test eslintmodule ../custom/<custom_module>
```
#### Using ES Lint in a GitLab pipeline
The easiest way is to use our templates for a GitLab pipeline. They can be found [here](https://gitlab.lakedrops.com/gitlab-ci-cd/drupal).
To take advantage of the Drupal optimized pipelines we make heavy use of the [GitLab Templates](https://www.drupal.org/project/gitlab_templates) project.
Here you find more information of using [ES Lint in a pipeline](https://project.pages.drupalcode.org/gitlab_templates/jobs/eslint/).
### CSpell
#### Using CSpell in a GitLab pipeline
The easiest way is to use our templates for a GitLab pipeline. They can be found [here](https://gitlab.lakedrops.com/gitlab-ci-cd/drupal).
To take advantage of the Drupal optimized pipelines we make heavy use of the [GitLab Templates](https://www.drupal.org/project/gitlab_templates) project.
Here you find more information of using [CSpell in a pipeline](https://project.pages.drupalcode.org/gitlab_templates/jobs/cspell/).
## Unit/Kernel/Functional Testing
To execute the tests, you can use a single command:
...
...
@@ -288,6 +335,16 @@ arrow:
You can also use the execution with the debugger.
### Using PHPUnit in a GitLab pipeline
The easiest way is to use our templates for a GitLab pipeline. They can be found [here](https://gitlab.lakedrops.com/gitlab-ci-cd/drupal).
To take advantage of the Drupal optimized pipelines we make heavy use of the [GitLab Templates](https://www.drupal.org/project/gitlab_templates) project.
Here you find more information of using [PHPUnit in a pipeline](https://project.pages.drupalcode.org/gitlab_templates/jobs/phpunit/).
### Code Coverage
First, activate the coverage option:
...
...
@@ -321,3 +378,52 @@ Now you can execute every test including code coverage. To check, if it is
working properly, a new view for coverage should open in your IDE, like: