mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 15:55:49 +00:00
Merge pull request #58 from cheapy-ispp/travis
Arreglos de Travis y Codacy
This commit is contained in:
commit
6ac1b93631
4 changed files with 44 additions and 10 deletions
22
.travis.yml
22
.travis.yml
|
@ -3,12 +3,20 @@ language: java
|
|||
jdk: oraclejdk8
|
||||
services:
|
||||
- mysql
|
||||
install:
|
||||
- ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||
cache:
|
||||
directories:
|
||||
- "$HOME/.m2"
|
||||
before_cache:
|
||||
- rm -rf $HOME/.m2/repository/com/autentia/traviscodacy
|
||||
before_install:
|
||||
- chmod +x mvnw
|
||||
- mysql -e 'CREATE DATABASE cheapy;'
|
||||
- sudo apt-get update
|
||||
script:
|
||||
- mvn test -Dspring.profiles.active=mysql-travis
|
||||
- sudo apt-get install jq
|
||||
- wget -O ~/codacy-coverage-reporter-assembly-latest.jar $(curl https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r .assets[0].browser_download_url)
|
||||
- chmod +x mvnw
|
||||
- mysql -e 'CREATE DATABASE cheapy;'
|
||||
- sudo apt-get update
|
||||
after_success:
|
||||
- ls
|
||||
- ls target
|
||||
- ls target/jacoco
|
||||
- java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco/jacoco.xml
|
||||
|
||||
|
|
27
pom.xml
27
pom.xml
|
@ -28,6 +28,11 @@
|
|||
<wro4j.version>1.8.0</wro4j.version>
|
||||
|
||||
<jacoco.version>0.8.5</jacoco.version>
|
||||
<jacoco.utreportpath>${project.build.directory}/jacoco</jacoco.utreportpath>
|
||||
<jacoco.utreportfile>${project.build.directory}/jacoco.exec</jacoco.utreportfile>
|
||||
|
||||
<jacoco.itreportpath>${project.build.directory}/jacoco</jacoco.itreportpath>
|
||||
<jacoco.itreportfile>${jacoco.itreportpath}/jacoco-it.exec</jacoco.itreportfile>
|
||||
<nohttp-checkstyle.version>0.0.4.RELEASE</nohttp-checkstyle.version>
|
||||
<spring-format.version>0.0.25</spring-format.version>
|
||||
</properties>
|
||||
|
@ -140,7 +145,11 @@
|
|||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
@ -178,6 +187,7 @@
|
|||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
|
||||
</execution>
|
||||
<execution>
|
||||
<id>report</id>
|
||||
|
@ -185,6 +195,21 @@
|
|||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${jacoco.utreportpath}</outputDirectory>
|
||||
<dataFile>${jacoco.utreportfile}</dataFile>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${jacoco.utreportpath}</outputDirectory>
|
||||
<dataFile>${jacoco.utreportfile}</dataFile>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
# database init, supports mysql too
|
||||
database=mysql
|
||||
spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/cheapy?serverTimezone=UTC}
|
||||
#spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/cheapy?serverTimezone=UTC}
|
||||
spring.datasource.username=${MYSQL_USER:cheapy}
|
||||
spring.datasource.password=${MYSQL_PASS:cheapy}
|
||||
# SQL is written to be idempotent so this is safe
|
||||
spring.datasource.initialization-mode=always
|
||||
|
||||
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
|
||||
spring.jpa.properties.javax.persistence.schema-generation.drop-source=metadata
|
||||
# Naming strategy
|
||||
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
|
||||
|
|
|
@ -4,6 +4,8 @@ database=mysql
|
|||
spring.datasource.data=classpath*:db/${database}/data.sql
|
||||
spring.h2.console.enabled=true
|
||||
spring.profiles.active=mysql
|
||||
spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/cheapy?serverTimezone=UTC}
|
||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||
# Web
|
||||
spring.thymeleaf.mode=HTML
|
||||
|
||||
|
|
Loading…
Reference in a new issue