diff --git a/.travis.yml b/.travis.yml index f58c00d..3995219 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,11 @@ notifications: on_failure: never script: -- curl -i -X POST -d $TRAVIS_REPO_SLUG http://vicinity.iot.linkeddata.es/reqmanager/rest/hook/; -- response=$(curl -i -X POST -d $TRAVIS_REPO_SLUG http://vicinity.iot.linkeddata.es/reqmanager/rest/test/); -- echo ${response} -- if [${response} == *'WARNING'*]; then - exit(1) - fi + - if [[ $TRAVIS_EVENT_TYPE == "pull_request" ]]; then + curl -i -X POST -d $TRAVIS_REPO_SLUG http://vicinity.iot.linkeddata.es/reqmanager/rest/hook/ && + curl -i -X POST -d $TRAVIS_REPO_SLUG http://vicinity.iot.linkeddata.es/reqmanager/rest/hook && + response=$(curl -i -X POST -d $TRAVIS_REPO_SLUG http://vicinity.iot.linkeddata.es/reqmanager/rest/test/) && echo ${response} && + if [[ ${response} == *"WARNING"* ]] || [[ ${response} == *"ERROR"* ]]; then + exit 1; + fi; + fi