Commit d070250f authored by Evan Read's avatar Evan Read

Merge branch 'mfluharty-master-patch-25484' into 'master'

Document both ways to define coverage regex in "add coverage to an MR" documentation

See merge request gitlab-org/gitlab!78717
parents 63dbcadc 36e857d9
......@@ -201,23 +201,28 @@ If you use test coverage in your code, you can use a regular expression to
find coverage results in the job log. You can then include these results
in the merge request in GitLab.
If the pipeline succeeds, the coverage is shown in the merge request widget and
in the jobs table. If multiple jobs in the pipeline have coverage reports, they are
averaged.
![MR widget coverage](img/pipelines_test_coverage_mr_widget.png)
![Build status coverage](img/pipelines_test_coverage_build.png)
To define a coverage-parsing regular expression:
1. On the top bar, select **Menu > Projects** and find your project.
1. On the left sidebar, select **Settings > CI/CD**.
1. Expand **General pipelines**.
1. In the **Test coverage parsing** field, enter a regular expression.
Leave blank to disable this feature.
Alternatively, provide a regular expression using the [`coverage`](../yaml/index.md#coverage)
keyword in your project's `.gitlab-ci.yml`.
You can use <https://rubular.com> to test your regex. The regex returns the **last**
match found in the output.
If the pipeline succeeds, the coverage is shown in the merge request widget and
in the jobs table. If multiple jobs in the pipeline have coverage reports, they are
averaged.
![MR widget coverage](img/pipelines_test_coverage_mr_widget.png)
![Build status coverage](img/pipelines_test_coverage_build.png)
### Test coverage examples
Use this regex for commonly used test tools.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment