Skip to content
Snippets Groups Projects
Commit 9c79b345 authored by danielspeicher's avatar danielspeicher
Browse files

Add GitLab templates for test

parent a823c37e
No related branches found
No related tags found
1 merge request!17Develop
......@@ -34,6 +34,7 @@ This will print out a list with all available tools:
- [PHP Metrics](../../../dev_tools/test.md#php-metrics)
- [Stylelint](../../../dev_tools/test.md#stylelint)
- [Eslint](../../../dev_tools/test.md#es-lint)
- [Cspell](../../../dev_tools/test.md#cspell)
## Working with Themes
......
......@@ -13,6 +13,7 @@ code analysis to unit testing.
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment