Arreglo travis y codacy

This commit is contained in:
Pablo Franco Sánchez 2021-04-03 15:49:52 +02:00
parent 1e8bba1073
commit 6864541de2
2 changed files with 63 additions and 60 deletions

View file

@ -15,9 +15,8 @@ before_install:
- mysql -e 'CREATE DATABASE cheapy;' - mysql -e 'CREATE DATABASE cheapy;'
- sudo apt-get update - sudo apt-get update
after_success: after_success:
- mvn test
- ls - ls
- ls target - ls target
- ls target/site - ls target/jacoco
- java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco.xml - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco/jacoco.xml

62
pom.xml
View file

@ -27,10 +27,11 @@
<webjars-jquery.version>2.2.4</webjars-jquery.version> <webjars-jquery.version>2.2.4</webjars-jquery.version>
<wro4j.version>1.8.0</wro4j.version> <wro4j.version>1.8.0</wro4j.version>
<jacoco.version>0.7.6.201602180812</jacoco.version> <jacoco.version>0.8.5</jacoco.version>
<jacoco.outputDir>${project.build.directory}</jacoco.outputDir> <jacoco.utreportpath>${project.build.directory}/jacoco</jacoco.utreportpath>
<jacoco.utreportpath>${project.build.directory}</jacoco.utreportpath> <jacoco.utreportfile>${project.build.directory}/jacoco.exec</jacoco.utreportfile>
<jacoco.utreportfile>${jacoco.utreportpath}/jacoco.exec</jacoco.utreportfile>
<jacoco.itreportpath>${project.build.directory}/jacoco</jacoco.itreportpath>
<jacoco.itreportfile>${jacoco.itreportpath}/jacoco-it.exec</jacoco.itreportfile> <jacoco.itreportfile>${jacoco.itreportpath}/jacoco-it.exec</jacoco.itreportfile>
<nohttp-checkstyle.version>0.0.4.RELEASE</nohttp-checkstyle.version> <nohttp-checkstyle.version>0.0.4.RELEASE</nohttp-checkstyle.version>
<spring-format.version>0.0.25</spring-format.version> <spring-format.version>0.0.25</spring-format.version>
@ -156,26 +157,41 @@
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<!-- Spring Boot Actuator displays build-related information
if a META-INF/build-info.properties file is present -->
<goals>
<goal>build-info</goal>
</goals>
<configuration>
<additionalProperties>
<encoding.source>${project.build.sourceEncoding}</encoding.source>
<encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
<java.source>${maven.compiler.source}</java.source>
<java.target>${maven.compiler.target}</java.target>
</additionalProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version> <version>${jacoco.version}</version>
<executions> <executions>
<execution> <execution>
<id>pre-unit-test</id>
<phase>process-test-classes</phase>
<goals> <goals>
<goal>prepare-agent</goal> <goal>prepare-agent</goal>
</goals> </goals>
<configuration>
<propertyName>surefireArgLine</propertyName>
<destFile>${jacoco.utreportfile}</destFile>
<append>true</append>
</configuration>
</execution> </execution>
<execution> <execution>
<id>post-unit-test</id> <id>report</id>
<phase>test</phase> <phase>prepare-package</phase>
<goals> <goals>
<goal>report</goal> <goal>report</goal>
</goals> </goals>
@ -185,26 +201,14 @@
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
<id>pre-integration-test</id> <id>test</id>
<phase>pre-integration-test</phase> <phase>test</phase>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<propertyName>failsafeArgLine</propertyName>
<destFile>${jacoco.itreportfile}</destFile>
<append>true</append>
</configuration>
</execution>
<execution>
<id>post-integration-test</id>
<phase>post-integration-test</phase>
<goals> <goals>
<goal>report</goal> <goal>report</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory>${jacoco.itreportpath}</outputDirectory> <outputDirectory>${jacoco.utreportpath}</outputDirectory>
<dataFile>${jacoco.itreportfile}</dataFile> <dataFile>${jacoco.utreportfile}</dataFile>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>