2 votes

Travis CI does not run when making a pull request on GitHub

I have the travis.yml file configured as follows:

  dist: trusty 
 language: java 
 jdk: oraclejdk8
 services:
   - mysql before_install:
   - mysql -e 'CREATE DATABASE petclinic;' 
 script: mvn test -Dspring-boot.run.profiles=mysql-travis
 
 addons:   
 sonarcloud:
 organization: ""
     token:   
         secure: "" 
 script:
    - mvn clean verify sonar:sonar -Pcoverage -Dsonar.projectKey = name

But I am not being executed. However if I remove the addons part down it does run. I clarify that where the quotes and name go the corresponding variables and tokens. I don't know if the problem is because of the structure scheme that I follow, the idea is to include SonarCloud when analyzing together with Travis CI.

1voto

Jesus_jbs Points 79

I write this in case someone has the same problem and doesn't know how to fix it. The problem has been solved by removing the first script label and adding the command to the final script label.

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X