@@ -226,6 +226,32 @@ In order to implement the best GitLab and SonarQube integration, the .NET templa
:information_source: the `coverlet.msbuild` package shall be added to your test projects ([see NuGet](https://www.nuget.org/packages/coverlet.msbuild))
### `dotnet-stryker` job
This job runs [stryker mutation testing](https://stryker-mutator.io/) on the configured test suits in the project. This gives you an idea on how well your tests are covering the code.
This job will post a summary of the test report and a link to the full report as a comment in an open merge request. /!\ This requires that you configure a CI/CD variable `GITLAB_TOKEN` and give it API permissions.
**Execution rules:**
- Runs a full mutation test run on release, integration, or production branches.
- Runs a differential mutation test `--since ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}` on MR branches.
It uses the following variables:
| Input / Variable | Description | Default value |
In case you want to use the [Stryker dashboard](https://dashboard.stryker-mutator.io/) you will need to configure several things:
- Update your project files to contain _project name_ and _project version_ or use [SourceLink](https://github.com/dotnet/sourcelink#readme)
- Configure a CI/CD variable like `STRYKER_API_KEY` with the dashboard api key.
- Add `--dashboard-api-key ${STRYKER_API_KEY}` to the `stryker-opts`.
### `dotnet-format` job
This job performs code formatting validation using [`dotnet format`](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format) of the **whole repository**. It verifies that the code follows the formatting rules defined in `.editorconfig`.