gtest-demo-gitlab icon indicating copy to clipboard operation
gtest-demo-gitlab copied to clipboard

Unit test demo using Google Test and GitLab CI

gtest-demo-gitlab

C/C++ unit test demo using Google Test deployed to GitLab CI. This is a fork of the project that used Travis CI instead.

  • Licensed under BSD-3

How to build this demo

git clone --recursive https://github.com/pothitos/gtest-demo-gitlab.git
cd gtest-demo-gitlab
mkdir build
cd build
cmake ..
make -j
./unit_tests

How to report coverage to GitLab CI

Here are the general instructions. In brief:

  1. Press the cog icon in the upper right corner of your project.
  2. Click on CI/CD Pipelines.
  3. In the Test coverage parsing field, enter the regular expression ^TOTAL.*\s+(\d+\%)$ indicated as an example in the same page.

Except from the individual page of each build, the coverage percentage is displayed if you click on Pipelines and then Builds.