diff --git a/.gitignore b/.gitignore index 6af0f61..731093e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea .php_cs.cache .phpunit.result.cache +.scannerwork composer.lock vendor/ diff --git a/.travis.yml b/.travis.yml index cb2b65e..ba99626 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,24 @@ dist: bionic - +sudo: false language: php -php: - - "7.2" - - "7.3" - - "7.4snapshot" -sudo: false +matrix: + fast_finish: true + include: + - php: "7.2" + env: RUN_SONAR_SCANNER=1 + - php: "7.3" + - php: "7.4snapshot" cache: directories: - $HOME/.composer/cache + - $HOME/.sonar/cache + +addons: + sonarcloud: + token: + secure: "eF3b/0bSCIWB8OUui87kyN38ULittcLDo4LTodZvpn7ZR+GlLVVLkU6ie/cL1NdQO5iq4CWFwy6rGUTINfwJgMQ1ZUsVMD/4xxI+hm5XXE1vQsM1CkWVdBYQKS2asFJWPoYXjO7b+ogTX+X3kGOM5E6fFl+MlZMyisn0xK51TCSYGdGJG2DiGXxdcdylzlnLZ9MiVrQoBoRHRd1IFtL/0bCq6lpBx9L7x5mNgWBHuIm2QcbYy1HZeZ8q/jBmXSld1H27nQuliYkrlKdWu9K7mcP1Wt+V+CXXzrdWIsZzku3UewH7ksu+3oJydJ1BPeB48zI3+JuNbla6vh3NFoBOQSSXi9hx0IJhNNT1xpqfBw6UwMEOrKZB4s7RTxVoZ4eH15eY/p23sREaXIKJ/H1b23Ruv6VqE748B2YNjO57HddWHoUxGUvtI3ryD3W0gVMbAj3/KUZuslzQDOcm/6szBwZuW44RH7Jd/lYhGfex0stk4oMMsjtFT+Rw2PxJST+q3BJ2IuYxwnqOV2CkABb/LBnkJAD8e7UQIPBy6WcsYmOo58E2aSVvC2bGC/BaQzdKxIM7lCay7w1qK2uv1V/6K2rhLCZoQ7abwgC/gEnBJrtZTk5EuwWI0Llh8fQA6+LXvFbFuvpCeA9NkCid48uMVoxjc2btgHo/Gujhuq3AyvA=" before_install: - composer self-update @@ -22,3 +30,4 @@ before_script: script: - find . -name \*.php ! -path "./vendor/*" -exec php -d display_errors=stderr -l {} > /dev/null \; - vendor/bin/phpunit -c tests/phpunit.xml.dist --log-junit logs/phpunit.xml --coverage-text --coverage-clover logs/clover.xml + - if [[ $RUN_SONAR_SCANNER == "1" ]]; then sonar-scanner -Dsonar.projectVersion=$TRAVIS_TAG; fi diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..2c4d89e --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,3 @@ +sonar.host.url=https://sonarcloud.io +sonar.projectKey=jobrouter-client +sonar.organization=brotkrueml-github