diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 576e8bab88bcdb68c60dc340e8ae3ce9c25f4d64..270ea753db6842fc820341e69fff04c538f70ee9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,6 +24,7 @@ unittest-job: - build-job script: - "mvn package -f tdt4140-gr1800/pom.xml $MAVEN_CLI_OPTS" + - "cat tdt4140-gr1800/target/site/jacoco/index.html" integrationtest-job: stage: test diff --git a/tdt4140-gr1800/app.core/pom.xml b/tdt4140-gr1800/app.core/pom.xml index b043414cdd8d5241327635180fa948e23dfa12e5..985bded0b7da356ee6f3f0c29de331329fd10e57 100644 --- a/tdt4140-gr1800/app.core/pom.xml +++ b/tdt4140-gr1800/app.core/pom.xml @@ -33,4 +33,30 @@ <scope>test</scope> </dependency> </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>0.8.0</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> + </plugins> + </build> + </project> \ No newline at end of file