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

118
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,59 +157,62 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.jacoco</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>${jacoco.version}</version> <executions>
<executions> <execution>
<execution> <!-- Spring Boot Actuator displays build-related information
<id>pre-unit-test</id> if a META-INF/build-info.properties file is present -->
<phase>process-test-classes</phase> <goals>
<goals> <goal>build-info</goal>
<goal>prepare-agent</goal> </goals>
</goals> <configuration>
<configuration> <additionalProperties>
<propertyName>surefireArgLine</propertyName> <encoding.source>${project.build.sourceEncoding}</encoding.source>
<destFile>${jacoco.utreportfile}</destFile> <encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
<append>true</append> <java.source>${maven.compiler.source}</java.source>
</configuration> <java.target>${maven.compiler.target}</java.target>
</execution> </additionalProperties>
<execution> </configuration>
<id>post-unit-test</id> </execution>
<phase>test</phase> </executions>
<goals> </plugin>
<goal>report</goal> <plugin>
</goals> <groupId>org.jacoco</groupId>
<configuration> <artifactId>jacoco-maven-plugin</artifactId>
<outputDirectory>${jacoco.utreportpath}</outputDirectory> <version>${jacoco.version}</version>
<dataFile>${jacoco.utreportfile}</dataFile> <executions>
</configuration> <execution>
</execution> <goals>
<execution> <goal>prepare-agent</goal>
<id>pre-integration-test</id> </goals>
<phase>pre-integration-test</phase>
<goals> </execution>
<goal>prepare-agent-integration</goal> <execution>
</goals> <id>report</id>
<configuration> <phase>prepare-package</phase>
<propertyName>failsafeArgLine</propertyName> <goals>
<destFile>${jacoco.itreportfile}</destFile> <goal>report</goal>
<append>true</append> </goals>
</configuration> <configuration>
</execution> <outputDirectory>${jacoco.utreportpath}</outputDirectory>
<execution> <dataFile>${jacoco.utreportfile}</dataFile>
<id>post-integration-test</id> </configuration>
<phase>post-integration-test</phase> </execution>
<goals> <execution>
<goal>report</goal> <id>test</id>
</goals> <phase>test</phase>
<configuration> <goals>
<outputDirectory>${jacoco.itreportpath}</outputDirectory> <goal>report</goal>
<dataFile>${jacoco.itreportfile}</dataFile> </goals>
</configuration> <configuration>
</execution> <outputDirectory>${jacoco.utreportpath}</outputDirectory>
</executions> <dataFile>${jacoco.utreportfile}</dataFile>
</plugin> </configuration>
</execution>
</executions>
</plugin>
<!-- Spring Boot Actuator displays build-related information if a git.properties <!-- Spring Boot Actuator displays build-related information if a git.properties
file is present at the classpath --> file is present at the classpath -->