Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Build cobertura report only on master for successful builds
Browse files Browse the repository at this point in the history
Building the report takes time, and when someone submits a pull request,
we should not show it as failure if the build timeouts for the report.

We only need the report when we build master, and only if the build is
successful.

Author: Franck Cuny <fcuny@apache.org>

Reviewers: Sijie Guo <sijie@apache.org>

Closes #45 from franckcuny/fcuny/fix-travis
  • Loading branch information
fcuny committed Dec 1, 2016
1 parent ebaf145 commit e611ef9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ before_install:
- echo "MAVEN_OPTS='-Xmx3072m -XX:MaxPermSize=512m'" > ~/.mavenrc

script:
- travis_retry mvn clean apache-rat:check
- travis_retry mvn clean install findbugs:check -DskipTests=true
- travis_wait 60 mvn package cobertura:cobertura coveralls:report
- travis_retry mvn --batch-mode clean apache-rat:check
- travis_retry mvn --batch-mode clean install findbugs:check -DskipTests=true

# we build the report only after a successful build on master
after_success:
- $TRAVIS_BRANCH == 'master' && travis_wait 60 mvn --batch-mode clean cobertura:cobertura coveralls:report

cache:
directories:
Expand Down

0 comments on commit e611ef9

Please sign in to comment.