mailgun-php/.travis.yml
2019-01-06 10:37:07 +01:00

44 lines
1.1 KiB
YAML

language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
php:
- 7.1
- 7.2
- 7.3
branches:
except:
- /^analysis-.*$/
- /^patch-.*$/
env:
- TEST_COMMAND="composer test"
matrix:
fast_finish: true
include:
- php: 7.1
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" PREFER_COVERAGE=true
install:
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
before_script:
- if [[ "COVERAGE" = true ]]; then TEST_COMMAND="composer test-coverage"; fi
- if ! [[ "$TRAVIS_PULL_REQUEST" = false ]]; then TEST_COMMAND="composer test"; fi
- if [[ "$PREFER_COVERAGE" = true ]] && [[ "$TRAVIS_PULL_REQUEST" = false ]]; then TEST_COMMAND="composer test-coverage" COVERAGE=true; fi
script:
- composer validate --strict --no-check-lock
- echo $TEST_COMMAND
- $TEST_COMMAND
after_success:
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi