Skip to content

Commit

Permalink
[ADAM-1403] Push coverage reports to Coveralls.
Browse files Browse the repository at this point in the history
Resolves #1403.
  • Loading branch information
fnothaft authored and heuermh committed Feb 26, 2017
1 parent 2190485 commit 1830788
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
23 changes: 23 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,29 @@
</plugins>
</build>
</profile>
<profile>
<id>coveralls</id>
<build>
<plugins>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<coberturaReports>
<param>${project.build.directory}/cobertura.xml</param>
</coberturaReports>
<sourceDirectories>
<param>adam-core/src/main/scala</param>
<param>adam-core/src/main/java</param>
<param>adam-apis/src/main/scala</param>
<param>adam-cli/src/main/scala</param>
</sourceDirectories>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Only sign artifacts when we are performing a release, not snapshots -->
<profile>
<id>sonatype-oss-release</id>
Expand Down
21 changes: 20 additions & 1 deletion scripts/jenkins-test
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,29 @@ mvn clean \
-Dhadoop.version=${HADOOP_VERSION} \
-Dspark.version=${SPARK_VERSION}

# if this is a pull request, we need to set the coveralls pr id
if [[ ! -z $ghprbPullId ]];
then
COVERALLS_PRB_OPTION="-DpullRequest=${ghprbPullId}"
fi

# coveralls token should not be visible
set +x +v

if [[ -z ${COVERALLS_REPO_TOKEN} ]];
then
echo "Coveralls token is not set. Exiting..."
exit 1
fi

# if those pass, build the distribution package and the integration tests
mvn -U \
test \
-P coverage scoverage:report
-P coverage,coveralls scoverage:report coveralls:report \
-DrepoToken=${COVERALLS_REPO_TOKEN} ${COVERALLS_PRB_OPTION}

# make verbose again
set -x -v

# if those pass, build the distribution package
mvn -U \
Expand Down

0 comments on commit 1830788

Please sign in to comment.