Code coverage

This commit is contained in:
heiko.reese
2021-09-13 00:28:12 +02:00
parent b32d6fc861
commit 36fcdfaf42
2 changed files with 31 additions and 4 deletions

View File

@ -11,14 +11,32 @@ stages:
.image-focal:
image: '${CONTAINER_REGISTRY_NAME}/exim-encrypt-dlfunc-build-focal'
.code-coverage:
stage: build
script:
- meson build -Db_coverage=true
- cd build
- ninja
- ninja test
- ninja coverage-xml
- grep -Eo 'line-rate="[^"]+"' meson-logs/coverage.xml | head -n 1 |
grep -Eo '[0-9.]+' | awk '{ printf "coverage\x3a %.2f%% of statements\n", $1 * 100 }'
- ninja coverage-html
- mv meson-logs/coveragereport ../coverage
artifacts:
paths:
- coverage/
reports:
cobertura: build/meson-logs/coverage.xml
.build:
stage: build
script:
- which meson
- meson build
- cd build
- ninja
- ninja test
- cd ..
artifacts:
paths:
- build/src/libexim-encrypt-dlfunc.so
@ -39,10 +57,17 @@ stages:
- ./*.changes
- ./*.buildinfo
code-coverage:
extends:
- .image-bullseye
- .code-coverage
needs: [ ]
build:bullseye:
extends:
- .image-bullseye
- .build
- .code-coverage
needs: [ ]
build:focal: