CI: Enable coverage reports
Blacklisted some files not directly relevant to the codebase (such as tests, tools and debugging functions). The coverage HTML report gets attached as a build artifact, although unfortunately we can't link directly to the `index.html`. We also attach the coverage XML as a cobertura report, although I'm not sure if it does anything.
This commit is contained in:
committed by
Jean-Baptiste Kempf
parent
a2f90805e0
commit
2b98fd286c
+14
-1
@@ -4,7 +4,7 @@ stages:
|
||||
- test
|
||||
|
||||
.debian-amd64-common:
|
||||
image: registry.videolan.org/dav1d-debian-unstable:20200306210534
|
||||
image: registry.videolan.org/dav1d-debian-unstable:20200602183013
|
||||
stage: build
|
||||
tags:
|
||||
- docker
|
||||
@@ -383,8 +383,21 @@ test-debian:
|
||||
- meson build --buildtype release
|
||||
-Dtestdata_tests=true
|
||||
-Dlogging=false
|
||||
-Db_coverage=true
|
||||
- ninja -C build
|
||||
- cd build && time meson test -v
|
||||
- ninja coverage-html
|
||||
- mv meson-logs/coveragereport ../coverage
|
||||
- ninja coverage-xml
|
||||
- grep -Eo 'line-rate="[^"]+"' meson-logs/coverage.xml | head -n 1 |
|
||||
grep -Eo '[0-9.]+' | awk '{ print "coverage:", $1 * 100 } '
|
||||
coverage: '/^coverage: (\d+.\d+)$/'
|
||||
artifacts:
|
||||
expose_as: 'Coverage HTML report'
|
||||
paths:
|
||||
- coverage/
|
||||
reports:
|
||||
cobertura: build/meson-logs/coverage.xml
|
||||
|
||||
test-debian-asm:
|
||||
extends:
|
||||
|
||||
Reference in New Issue
Block a user