diff --git a/.travis.yml b/.travis.yml index b9f5fb10..b39a6b5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,19 @@ language: java sudo: false - install: true + script: ./travis.sh +addons: + sonarqube: + token: + secure: "CTOzP3DCtl6GotoLEiKjLcmw2aJ4bw6hpxp/sskmFg+6qq/u1lt8VSueJIcDdpRqt5azpyvM6+yEM+9Rlm2SmJ08pmRcCL/WDPB4r2q5aQ8pyqOLUvVcdfiDoB3opWYNJKLHW3OQRfVxxDoNOWkhdvMlhndXQmjbmEJkMOY9cuv54hy/ypEwp0MGynHc/mJ4sC+tI5q+jpDldYLaEiGJiraULQmie5L+1SXUBBHkxQiPOEJ+ZcbjqfZzUzU8Z1Nyie4n9seozBhh2eFiGzsYp015IpTZ8YnddE7mklxSj5bzQewpcKmGlepRjCA221ifpmcw9QoW6EMh8IXwAg0F89EmVh5twa3BIEwC35OhNTfjb/TAWtmDpyUskrkiRZN6RnqpN5LU9/gAKOcnV5d5u5o3qVzQfyVZ6qEzubt5w8yx20h9mwWi3FXAXQUUkSI9thjD+Fqs+zZ2h7FWImKxma/cTVoTO9bjyYlvOlNMK3SgWUJeZXfqSAas2p+DtNbbP4eYcQdEyAKGKqBU3X7GZezCbxSeODXEgy0eLXmxLJCOg4RBbV08k1pqbZ0YaSZsag1mO2Lc8UlOkeUB3MxHP5GCFPYxM8MNsYuZfshXbUAEeUGathJbScmTBfbDJb/Xsb2HP/CPkiCGgbLHXV3SJKJjmQvjdG+DcuJ3rZKTBG8=" + cache: apt: true directories: - ~/.m2 + - '$HOME/.sonar/cache' addons: apt: @@ -25,3 +31,7 @@ matrix: # package - jdk: oraclejdk8 env: TEST=nondex + + # sonar + - jdk: oraclejdk8 + env: TEST=sonar diff --git a/travis.sh b/travis.sh index 22c0403b..56e45a44 100755 --- a/travis.sh +++ b/travis.sh @@ -8,6 +8,11 @@ ci) mvn clean verify -B -e -V ;; +sonar) + if [[ $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi + mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar + ;; + nondex) cd checkstyle-sonar-plugin mvn --fail-never clean nondex:nondex -Dcheckstyle.skip=true