Skip to content

Commit

Permalink
Improved travis workflow (#3289)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Oct 18, 2018
1 parent 81bc9c3 commit 97328b6
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,29 @@ branches:
except:
- l10n_2.4

php:
- 7.1
- 7.2

before_install:
- cp .env.example .env
- phpenv config-rm xdebug.ini

install: travis_retry composer install --no-interaction --no-suggest

script:
- if [ "$TRAVIS_PHP_VERSION" != "7.1" ]; then vendor/bin/phpunit; fi
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
install:
- travis_retry composer install --no-interaction --no-suggest

after_script:
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
jobs:
include:
- stage: Security check
script:
- wget https://get.sensiolabs.org/security-checker.phar
- php security-checker.phar security:check ./composer.lock
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

0 comments on commit 97328b6

Please sign in to comment.