Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit 125664c

Browse files
committed
ci: добавил вычисление процента покрытия тестами
1 parent 5fbd2b7 commit 125664c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.gitlab-ci.yml

+19
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,25 @@ run_tests:
122122
junit:
123123
- $CI_PROJECT_DIR/junit/*.xml
124124

125+
generate_coverage_report:
126+
stage: test
127+
extends: ['.tags']
128+
needs:
129+
- 'run_tests'
130+
before_script:
131+
- dotnet tool install --tool-path /tools dotnet-reportgenerator-globaltool --version 5.1.12
132+
script:
133+
- /tools/reportgenerator
134+
-reports:$CI_PROJECT_DIR/cobertura/**/coverage.cobertura.xml
135+
-targetdir:coverage
136+
"-reporttypes:Html;Badges"
137+
coverage: '/Branch coverage: (\d+(?:\.\d+)?%)/'
138+
artifacts:
139+
expire_in: 7 days
140+
expose_as: 'Coverage report'
141+
paths:
142+
- coverage/
143+
125144
.package:
126145
stage: publish
127146
extends: .tags

0 commit comments

Comments
 (0)