CI: add code coverage report

This commit is contained in:
Claudio André 2018-06-17 19:13:39 -03:00 committed by Georges Basile Stavracas Neto
parent a5eccee8fd
commit a1d57165c1

View file

@ -65,6 +65,52 @@ test:
meson test -C _build --verbose --no-stdsplit
fi
##
# Stage: Test
#
# Runs the coverage test.
##
coverage:
stage: test
artifacts:
name: log
when: always
paths:
- $(pwd)/*.log
- _build/meson-logs/*
- _build/meson-logs/coveragereport
script:
- echo "== Info =="
- build-aux/ci/ci-helper.sh "INFO"
- build-aux/ci/ci-helper.sh "GIT_INFO"
- echo "== Building =="
- rm -rf _build/
- meson . _build -Db_coverage=true
- ninja -C _build 2>&1 | tee compilation.log
- echo "== Testing =="
- ninja -C _build test
- ninja -C _build coverage-html
##
# Stage: Delivery
#
# Publish the Coverage Report generated above
##
pages:
stage: delivery
dependencies:
- coverage
script:
- mv _build/meson-logs/coveragereport/ public/
artifacts:
paths:
- public
only:
- master@GNOME/gnome-control-center
##
# Stage: Delivery
#