.travis.yml
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
matrix:
fast_finish: true
include:
- php: 7.1
env: TEST_FILES=true'
- php: 7.2
- php: nightly
allow_failures:
- php: nightly
addons:
sonarcloud:
organization: "fabiencrassat-github"
token:
secure: $SONAR_TOKEN
before_script: composer install
script:
- if [[ $TEST_FILES != true ]]; then ./vendor/bin/phpunit; fi
- if [[ $TEST_FILES == true ]]; then ./vendor/bin/phpunit --coverage-text --log-junit tests.junit.xml --coverage-clover coverage.clover.xml; fi
- if [[ $TEST_FILES == true ]]; then sonar-scanner "-Dsonar.projectVersion=$(git describe --tags)+build.$TRAVIS_BUILD_NUMBER"; fi