language: php branches: # Only test the master branch and SemVer tags. only: - master - '/^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+.*$/' matrix: include: - php: 7.2 env: 'SCENARIO=symfony4 HIGHEST_LOWEST="update"' - php: 7.1 env: 'SCENARIO=symfony4' - php: 7.0.11 env: 'HIGHEST_LOWEST="update"' - php: 7.0.11 - php: 5.6 - php: 5.5 - php: 5.4 env: 'SCENARIO=symfony2 HIGHEST_LOWEST="update --prefer-lowest' sudo: false cache: directories: - vendor - $HOME/.composer/cache install: - 'scenarios/install "${SCENARIO}" "${HIGHEST_LOWEST-install}"' script: - composer test after_success: - 'travis_retry php vendor/bin/coveralls -v' - | # Only do post-build actions in one environment, and only if there is a GITHUB token. if [ -z "$DO_POST_BUILD_ACTIONS" ] ; then return fi if [ -z "$GITHUB_TOKEN" ]; then echo "No GITHUB_TOKEN defined; exiting." return fi ### # Run composer lock update on cron jobs. # See: https://github.com/danielbachhuber/composer-lock-updater ### if [ "$TRAVIS_EVENT_TYPE" != "cron" ] ; then echo "Not a cron job; exiting." return fi ### # Only run on one job of a master branch build ### if [ "master" != "$TRAVIS_BRANCH" ] ; then echo "composer.lock update only runs on the master branch." return fi ### # Install composer-lock-updater ### export PATH="$HOME/.composer/vendor/bin:$PATH" composer global require danielbachhuber/composer-lock-updater ### # Optional: install Sensio Labs security checker to include security advisories in PR comments ### mkdir -p $HOME/bin wget -O $HOME/bin/security-checker.phar http://get.sensiolabs.org/security-checker.phar chmod +x $HOME/bin/security-checker.phar export PATH="$HOME/bin:$PATH" ### # Install hub for creating GitHub pull requests ### wget -O hub.tgz https://github.com/github/hub/releases/download/v2.2.9/hub-linux-amd64-2.2.9.tgz tar -zxvf hub.tgz export PATH=$PATH:$PWD/hub-linux-amd64-2.2.9/bin/ ### # Run composer-lock-updater ### clu