From 3e1fcbe598b7f02e553f5d5ec45f6d178f5569e3 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin <win10@list.ru> Date: Sun, 15 Dec 2019 23:48:59 +0400 Subject: [PATCH] Added code coverage reporting. Signed-off-by: Pavel Kirilin <win10@list.ru> --- .gitlab-ci.yml | 1 + pom.xml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29858a3..7a24269 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,7 @@ test: script: - make test - sudo /bin/chown -R gitlab-runner target + - cat target/site/jacoco/index.html cleanup: stage: cleanup diff --git a/pom.xml b/pom.xml index 59c500a..6b2a57b 100644 --- a/pom.xml +++ b/pom.xml @@ -79,6 +79,26 @@ <excludeDevtools>false</excludeDevtools> </configuration> </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>0.8.3</version> + <executions> + <execution> + <id>pre-unit-test</id> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + <execution> + <id>post-unit-test</id> + <phase>test</phase> + <goals> + <goal>report</goal> + </goals> + </execution> + </executions> + </plugin> <plugin> <artifactId>exec-maven-plugin</artifactId> <groupId>org.codehaus.mojo</groupId> -- GitLab