Commit 1941be1f authored by Philipp Götze's avatar Philipp Götze
Browse files

💚 Added coverage testing in gitlab-ci.yml

parent 5b1e098c
......@@ -9,7 +9,7 @@ build:
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage" ../src
- cmake -DCMAKE_BUILD_TYPE=Release ../src
- make
# clean up unnecessary files and strip binaries
- rm -rf _deps *tree generated
......@@ -17,6 +17,7 @@ build:
artifacts:
paths:
- build/
expire_in: 30 minutes
test:
stage: test
......@@ -27,3 +28,17 @@ test:
dependencies:
- build
coverage:
stage: build
script:
- echo pass | sudo -S dnf -y install python-pip
- pip install gcovr --user
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage" ../src
- make
- echo pass | sudo -S mkdir -m 777 -p /mnt/pmem/test
- ctest
- ~/.local/bin/gcovr -r .. --exclude _deps
coverage: '/^TOTAL.*\s+(\d+\%)$/'
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