Commit 2cb0cfb8 authored by Matija Obreza's avatar Matija Obreza
Browse files

CI: Code coverage with JaCoCo

parent a98bfa3e
...@@ -25,6 +25,12 @@ run tests in branches: ...@@ -25,6 +25,12 @@ run tests in branches:
except: except:
- master - master
- /^application\-blocks\-/ - /^application\-blocks\-/
artifacts:
reports:
junit:
- core/target/surefire-reports/TEST-*.xml
- security/target/surefire-reports/TEST-*.xml
- auditlog/target/surefire-reports/TEST-*.xml
publish snapshot artifacts: publish snapshot artifacts:
stage: deploy stage: deploy
...@@ -36,6 +42,12 @@ publish snapshot artifacts: ...@@ -36,6 +42,12 @@ publish snapshot artifacts:
- mvn clean deploy --settings .ci-maven-settings.xml -B -U - mvn clean deploy --settings .ci-maven-settings.xml -B -U
only: only:
- master - master
artifacts:
reports:
junit:
- core/target/surefire-reports/TEST-*.xml
- security/target/surefire-reports/TEST-*.xml
- auditlog/target/surefire-reports/TEST-*.xml
publish artifacts on central: publish artifacts on central:
stage: deploy stage: deploy
......
...@@ -150,13 +150,34 @@ ...@@ -150,13 +150,34 @@
<version>2.19.1</version> <version>2.19.1</version>
<configuration> <configuration>
<testFailureIgnore>false</testFailureIgnore> <testFailureIgnore>false</testFailureIgnore>
<useSystemClassLoader>false</useSystemClassLoader> <useSystemClassLoader>false</useSystemClassLoader>
<includes> <includes>
<include>**/*Test.java</include> <include>**/*Test.java</include>
<include>**/*Tests.java</include> <include>**/*Tests.java</include>
</includes> </includes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<configuration>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
......
...@@ -71,33 +71,6 @@ ...@@ -71,33 +71,6 @@
</modules> </modules>
<build> <build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>site</id>
<phase>pre-site</phase>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
<configuration>
<check />
<formats>
<format>html</format>
</formats>
<aggregate>true</aggregate>
<outputDirectory>./target/siteCobertura</outputDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
...@@ -109,11 +82,6 @@ ...@@ -109,11 +82,6 @@
<tagNameFormat>application-blocks-@{project.version}</tagNameFormat> <tagNameFormat>application-blocks-@{project.version}</tagNameFormat>
</configuration> </configuration>
</plugin> </plugin>
<!--cobertura-maven-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
<!--maven-compiler-plugin --> <!--maven-compiler-plugin -->
<plugin> <plugin>
<inherited>true</inherited> <inherited>true</inherited>
...@@ -198,16 +166,6 @@ ...@@ -198,16 +166,6 @@
</profile> </profile>
</profiles> </profiles>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
</plugin>
</plugins>
</reporting>
<distributionManagement> <distributionManagement>
<repository> <repository>
<id>ossrh</id> <id>ossrh</id>
......
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