Improved travis workflow (#3289)

This commit is contained in:
Graham Campbell
2018-10-18 23:13:12 +01:00
committed by GitHub
parent 81bc9c3fe5
commit 97328b6f9e

View File

@@ -6,20 +6,29 @@ branches:
except: except:
- l10n_2.4 - l10n_2.4
php:
- 7.1
- 7.2
before_install: before_install:
- cp .env.example .env - cp .env.example .env
- phpenv config-rm xdebug.ini - phpenv config-rm xdebug.ini
install: travis_retry composer install --no-interaction --no-suggest install:
- travis_retry composer install --no-interaction --no-suggest
script: jobs:
- if [ "$TRAVIS_PHP_VERSION" != "7.1" ]; then vendor/bin/phpunit; fi include:
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi - stage: Security check
script:
after_script: - wget https://get.sensiolabs.org/security-checker.phar
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi - php security-checker.phar security:check ./composer.lock
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi php: 7.1
- stage: Unit tests
script: vendor/bin/phpunit
php: 7.1
- stage: Unit tests
script: vendor/bin/phpunit
php: 7.2
- stage: Code coverage
script:
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
php: 7.1