Skip to content

Commit

Permalink
Merge pull request #103 from yiming187/travis
Browse files Browse the repository at this point in the history
enable coveralls
  • Loading branch information
yiming187 committed Feb 15, 2018
2 parents c234f8f + 519f486 commit 3be7af9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ addons:
jdk:
- oraclejdk8

before_script:
- echo "MAVEN_OPTS='-Xms1024m -Xmx3072m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m'" > ~/.mavenrc

script:
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent test
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent test coveralls:report
- if [[ -n "${TRAVIS_PULL_REQUEST_SLUG}" && "${TRAVIS_PULL_REQUEST_SLUG}" != "${TRAVIS_REPO_SLUG}" ]]; then
echo "The pull request from ${TRAVIS_PULL_REQUEST_SLUG} is an EXTERNAL pull request. Skip sonar analysis.";
else
Expand Down
19 changes: 11 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.8</version>
<version>0.8.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -1257,19 +1257,15 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<append>true</append>
<destFile>
${sonar.jacoco.reportPath}
</destFile>
</configuration>
<executions>
<execution>
<id>pre-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<append>true</append>
<destFile>${sonar.jacoco.reportPath}</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
Expand All @@ -1279,6 +1275,9 @@
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${sonar.jacoco.reportPath}</dataFile>
</configuration>
</execution>
</executions>
</plugin>
Expand Down Expand Up @@ -1310,6 +1309,11 @@
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.2.0</version>
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -1388,7 +1392,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down

0 comments on commit 3be7af9

Please sign in to comment.